From ddcb42512e95e98806db0523e4d954484a6e48cc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 23 May 2022 06:44:15 -0700 Subject: Upgrade router and navigation --- modern/src/other/EventPage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modern/src/other/EventPage.js') diff --git a/modern/src/other/EventPage.js b/modern/src/other/EventPage.js index c688e62a..9f5f7c84 100644 --- a/modern/src/other/EventPage.js +++ b/modern/src/other/EventPage.js @@ -4,7 +4,7 @@ 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 { useNavigate, useParams } from 'react-router-dom'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import Map from '../map/core/Map'; @@ -23,7 +23,7 @@ const useStyles = makeStyles(() => ({ const EventPage = () => { const classes = useStyles(); - const history = useHistory(); + const navigate = useNavigate(); const t = useTranslation(); const { id } = useParams(); @@ -60,7 +60,7 @@ const EventPage = () => {
- history.push('/')}> + navigate('/')}> {t('positionEvent')} -- cgit v1.2.3