aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/GeofencesPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-23 06:44:15 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-23 06:44:15 -0700
commitddcb42512e95e98806db0523e4d954484a6e48cc (patch)
tree795fbd841eb94ded02ce66a2a2c50c2cc52a7dcd /modern/src/other/GeofencesPage.js
parentfdbc6762b10233950d9c84fc71a9a8c11823f0a9 (diff)
downloadtrackermap-web-ddcb42512e95e98806db0523e4d954484a6e48cc.tar.gz
trackermap-web-ddcb42512e95e98806db0523e4d954484a6e48cc.tar.bz2
trackermap-web-ddcb42512e95e98806db0523e4d954484a6e48cc.zip
Upgrade router and navigation
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>