aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/GeofencesPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/other/GeofencesPage.js')
-rw-r--r--modern/src/other/GeofencesPage.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/other/GeofencesPage.js b/modern/src/other/GeofencesPage.js
index 98833cc7..80e23cba 100644
--- a/modern/src/other/GeofencesPage.js
+++ b/modern/src/other/GeofencesPage.js
@@ -5,7 +5,7 @@ import {
import { useTheme } from '@material-ui/core/styles';
import Drawer from '@material-ui/core/Drawer';
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
-import { useHistory } from 'react-router-dom';
+import { useNavigate } from 'react-router-dom';
import Map from '../map/core/Map';
import MapCurrentLocation from '../map/MapCurrentLocation';
import MapGeofenceEdit from '../map/MapGeofenceEdit';
@@ -51,7 +51,7 @@ const useStyles = makeStyles((theme) => ({
const GeofencesPage = () => {
const theme = useTheme();
const classes = useStyles();
- const history = useHistory();
+ const navigate = useNavigate();
const t = useTranslation();
const isPhone = useMediaQuery(theme.breakpoints.down('xs'));
@@ -65,7 +65,7 @@ const GeofencesPage = () => {
classes={{ paper: classes.drawerPaper }}
>
<div className={classes.drawerHeader}>
- <IconButton onClick={() => history.goBack()}>
+ <IconButton onClick={() => navigate(-1)}>
<ArrowBackIcon />
</IconButton>
<Typography variant="h6" color="inherit" noWrap>