aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/components/CollectionFab.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/components/CollectionFab.js')
-rw-r--r--modern/src/settings/components/CollectionFab.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/settings/components/CollectionFab.js b/modern/src/settings/components/CollectionFab.js
index f52bed38..36435cd9 100644
--- a/modern/src/settings/components/CollectionFab.js
+++ b/modern/src/settings/components/CollectionFab.js
@@ -1,7 +1,7 @@
import React from 'react';
import { Fab, makeStyles } from '@material-ui/core';
import AddIcon from '@material-ui/icons/Add';
-import { useHistory } from 'react-router-dom';
+import { useNavigate } from 'react-router-dom';
import { useReadonly } from '../../common/util/permissions';
import dimensions from '../../common/theme/dimensions';
@@ -18,13 +18,13 @@ const useStyles = makeStyles((theme) => ({
const CollectionFab = ({ editPath, disabled }) => {
const classes = useStyles();
- const history = useHistory();
+ const navigate = useNavigate();
const readonly = useReadonly();
if (!readonly && !disabled) {
return (
- <Fab size="medium" color="primary" className={classes.fab} onClick={() => history.push(editPath)}>
+ <Fab size="medium" color="primary" className={classes.fab} onClick={() => navigate(editPath)}>
<AddIcon />
</Fab>
);