aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/EventPage.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/EventPage.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/EventPage.js')
-rw-r--r--modern/src/other/EventPage.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/modern/src/other/EventPage.js b/modern/src/other/EventPage.js
index 8174de5a..f4427ca9 100644
--- a/modern/src/other/EventPage.js
+++ b/modern/src/other/EventPage.js
@@ -1,11 +1,11 @@
import React, { useState } from 'react';
import {
- makeStyles, Typography, AppBar, Toolbar, IconButton,
-} from '@material-ui/core';
-import ArrowBackIcon from '@material-ui/icons/ArrowBack';
-import { useHistory, useParams } from 'react-router-dom';
-import ContainerDimensions from 'react-container-dimensions';
+ Typography, AppBar, Toolbar, IconButton,
+} from '@mui/material';
+import makeStyles from '@mui/styles/makeStyles';
+import ArrowBackIcon from '@mui/icons-material/ArrowBack';
+import { useNavigate, useParams } from 'react-router-dom';
import { useEffectAsync } from '../reactHelper';
import { useTranslation } from '../common/components/LocalizationProvider';
import Map from '../map/core/Map';
@@ -24,7 +24,7 @@ const useStyles = makeStyles(() => ({
const EventPage = () => {
const classes = useStyles();
- const history = useHistory();
+ const navigate = useNavigate();
const t = useTranslation();
const { id } = useParams();
@@ -61,18 +61,16 @@ const EventPage = () => {
<div className={classes.root}>
<AppBar color="inherit" position="static">
<Toolbar>
- <IconButton color="inherit" edge="start" onClick={() => history.push('/')}>
+ <IconButton color="inherit" edge="start" onClick={() => navigate('/')}>
<ArrowBackIcon />
</IconButton>
<Typography variant="h6">{t('positionEvent')}</Typography>
</Toolbar>
</AppBar>
<div className={classes.mapContainer}>
- <ContainerDimensions>
- <Map>
- {position && <MapPositions positions={[position]} />}
- </Map>
- </ContainerDimensions>
+ <Map>
+ {position && <MapPositions positions={[position]} />}
+ </Map>
</div>
</div>
);