diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-18 16:51:07 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-18 16:51:07 -0700 |
commit | b88aa76538f8cebfa64d7f0d6b1cba8608432068 (patch) | |
tree | aa72c9642c34bf7f54ccc13563f0c14832b2ff27 /modern/src/settings/UsersPage.js | |
parent | a86739114c754e70506c43dd1bbf78a7d1039207 (diff) | |
download | trackermap-web-b88aa76538f8cebfa64d7f0d6b1cba8608432068.tar.gz trackermap-web-b88aa76538f8cebfa64d7f0d6b1cba8608432068.tar.bz2 trackermap-web-b88aa76538f8cebfa64d7f0d6b1cba8608432068.zip |
Improve user change
Diffstat (limited to 'modern/src/settings/UsersPage.js')
-rw-r--r-- | modern/src/settings/UsersPage.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modern/src/settings/UsersPage.js b/modern/src/settings/UsersPage.js index c6dd6949..f553f82c 100644 --- a/modern/src/settings/UsersPage.js +++ b/modern/src/settings/UsersPage.js @@ -1,6 +1,5 @@ import React, { useState } from 'react'; import { useDispatch } from 'react-redux'; -import { useNavigate } from 'react-router-dom'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; @@ -27,7 +26,6 @@ const useStyles = makeStyles((theme) => ({ const UsersPage = () => { const classes = useStyles(); const dispatch = useDispatch(); - const navigate = useNavigate(); const t = useTranslation(); const admin = useAdministrator(); @@ -41,7 +39,7 @@ const UsersPage = () => { if (response.ok) { const user = await response.json(); dispatch(sessionActions.updateUser(user)); - navigate('/'); + window.location.replace('/'); } else { throw Error(await response.text()); } |