Skip to content

Commit

Permalink
Client - add flag to button detail in navbar and rm link resource in …
Browse files Browse the repository at this point in the history
…viewer (#270)
  • Loading branch information
luorlandini authored Jun 25, 2021
1 parent 9eab770 commit f46e976
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function DetailsPanel({
<FaIcon name="share-alt" />
</Button>
</CopyToClipboard>}
{detailUrl && <Button
{detailUrl && !editThumbnail && <Button
variant="default"
href={detailUrl}
rel="noopener noreferrer">
Expand Down
10 changes: 6 additions & 4 deletions geonode_mapstore_client/client/js/plugins/DetailViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ConnectedDetailsPanel = connect(
}
)(DetailsPanel);

const ButtonViewer = ({onClick}) => {
const ButtonViewer = ({onClick, isEnabledViewer}) => {

const handleClickButton = () => {
onClick();
Expand All @@ -46,13 +46,15 @@ const ButtonViewer = ({onClick}) => {
return (<Button
variant="primary"
onClick={handleClickButton}
> <Message msgId="gnviewer.details"/>
active={!isEnabledViewer} > <Message msgId="gnviewer.details"/>
</Button>);
};

const ConnectedButton = connect(
createSelector([],
() => ({})),
createSelector([
state => state?.controls?.DetailViewer?.enabled || false
],
(isEnabledViewer) => ({isEnabledViewer})),
{
onClick: toggleControl.bind(null, 'DetailViewer', null)
}
Expand Down

0 comments on commit f46e976

Please sign in to comment.