aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/GeofencesPage.js
diff options
context:
space:
mode:
authorBoubrid Ihab <boubrid.ihab@gmail.com>2022-05-23 17:15:39 +0100
committerBoubrid Ihab <boubrid.ihab@gmail.com>2022-05-23 17:15:39 +0100
commit0b9209f877c42d9eb69d4b94cfa9c7f16a81967e (patch)
tree72286ee879bea52fa2dad73f36d1e2b36a35bc15 /modern/src/other/GeofencesPage.js
parentc30e57579868b8f3d21e6e6083e37cba8bcfa408 (diff)
parent0ed610e71b28461d6c9cc996764b00db5ac0b2ba (diff)
downloadtrackermap-web-0b9209f877c42d9eb69d4b94cfa9c7f16a81967e.tar.gz
trackermap-web-0b9209f877c42d9eb69d4b94cfa9c7f16a81967e.tar.bz2
trackermap-web-0b9209f877c42d9eb69d4b94cfa9c7f16a81967e.zip
Merge branch 'master' of github.com:traccar/traccar-web into fix-key-issue
Diffstat (limited to 'modern/src/other/GeofencesPage.js')
-rw-r--r--modern/src/other/GeofencesPage.js34
1 files changed, 16 insertions, 18 deletions
diff --git a/modern/src/other/GeofencesPage.js b/modern/src/other/GeofencesPage.js
index 1e866de6..6706ec98 100644
--- a/modern/src/other/GeofencesPage.js
+++ b/modern/src/other/GeofencesPage.js
@@ -1,12 +1,12 @@
import React from 'react';
import {
- Divider, makeStyles, Typography, IconButton, useMediaQuery,
-} from '@material-ui/core';
-import { useTheme } from '@material-ui/core/styles';
-import Drawer from '@material-ui/core/Drawer';
-import ContainerDimensions from 'react-container-dimensions';
-import ArrowBackIcon from '@material-ui/icons/ArrowBack';
-import { useHistory } from 'react-router-dom';
+ Divider, Typography, IconButton, useMediaQuery,
+} from '@mui/material';
+import makeStyles from '@mui/styles/makeStyles';
+import { useTheme } from '@mui/material/styles';
+import Drawer from '@mui/material/Drawer';
+import ArrowBackIcon from '@mui/icons-material/ArrowBack';
+import { useNavigate } from 'react-router-dom';
import Map from '../map/core/Map';
import MapCurrentLocation from '../map/MapCurrentLocation';
import MapGeofenceEdit from '../map/MapGeofenceEdit';
@@ -25,7 +25,7 @@ const useStyles = makeStyles((theme) => ({
overflow: 'hidden',
display: 'flex',
flexDirection: 'row',
- [theme.breakpoints.down('xs')]: {
+ [theme.breakpoints.down('sm')]: {
flexDirection: 'column-reverse',
},
},
@@ -34,7 +34,7 @@ const useStyles = makeStyles((theme) => ({
[theme.breakpoints.up('sm')]: {
width: dimensions.drawerWidthTablet,
},
- [theme.breakpoints.down('xs')]: {
+ [theme.breakpoints.down('sm')]: {
height: dimensions.drawerHeightPhone,
},
},
@@ -52,10 +52,10 @@ 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'));
+ const isPhone = useMediaQuery(theme.breakpoints.down('sm'));
return (
<div className={classes.root}>
@@ -66,7 +66,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>
@@ -77,12 +77,10 @@ const GeofencesPage = () => {
<GeofencesList />
</Drawer>
<div className={classes.mapContainer}>
- <ContainerDimensions>
- <Map>
- <MapCurrentLocation />
- <MapGeofenceEdit />
- </Map>
- </ContainerDimensions>
+ <Map>
+ <MapCurrentLocation />
+ <MapGeofenceEdit />
+ </Map>
</div>
</div>
</div>