diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-22 13:38:57 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-22 13:38:57 -0700 |
commit | aff28127974870c02001e8d8d44e973d0ba4fd22 (patch) | |
tree | 6c3d41939b77da228d0331fbc321e04301d9ac42 /modern/src/settings/components | |
parent | aae582bd582cd7bd596a23e699ffad13c38a06c8 (diff) | |
download | trackermap-web-aff28127974870c02001e8d8d44e973d0ba4fd22.tar.gz trackermap-web-aff28127974870c02001e8d8d44e973d0ba4fd22.tar.bz2 trackermap-web-aff28127974870c02001e8d8d44e973d0ba4fd22.zip |
Remove duplication
Diffstat (limited to 'modern/src/settings/components')
-rw-r--r-- | modern/src/settings/components/EditCollectionView.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/settings/components/EditCollectionView.js b/modern/src/settings/components/EditCollectionView.js index 9107b68e..ed92c838 100644 --- a/modern/src/settings/components/EditCollectionView.js +++ b/modern/src/settings/components/EditCollectionView.js @@ -9,7 +9,7 @@ import AddIcon from '@material-ui/icons/Add'; import RemoveDialog from '../../common/components/RemoveDialog'; import { useTranslation } from '../../common/components/LocalizationProvider'; import dimensions from '../../common/theme/dimensions'; -import { useEditable } from '../../common/util/permissions'; +import { useReadonly } from '../../common/util/permissions'; const useStyles = makeStyles((theme) => ({ fab: { @@ -29,7 +29,7 @@ const EditCollectionView = ({ const history = useHistory(); const t = useTranslation(); - const editable = useEditable(); + const readonly = useReadonly(); const [selectedId, setSelectedId] = useState(null); const [selectedAnchorEl, setSelectedAnchorEl] = useState(null); @@ -70,7 +70,7 @@ const EditCollectionView = ({ return ( <> <Content updateTimestamp={updateTimestamp} onMenuClick={menuShow} filter={filter} /> - {editable && !disableAdd && ( + {!readonly && !disableAdd && ( <Fab size="medium" color="primary" className={classes.fab} onClick={handleAdd}> <AddIcon /> </Fab> |