diff options
author | Anton Tananaev <anton@traccar.org> | 2022-04-17 11:51:27 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-04-17 11:51:27 -0700 |
commit | e470eeb4fcc923bc54968a6561f66c75dab288b9 (patch) | |
tree | fe17741ad65384e63d299426ae765b1e9fa3acfe /modern/src/settings/OptionsLayout | |
parent | 2054cc9d11d77d7883a5858bcbcc3833aed4b874 (diff) | |
download | trackermap-web-e470eeb4fcc923bc54968a6561f66c75dab288b9.tar.gz trackermap-web-e470eeb4fcc923bc54968a6561f66c75dab288b9.tar.bz2 trackermap-web-e470eeb4fcc923bc54968a6561f66c75dab288b9.zip |
Remove selectors file
Diffstat (limited to 'modern/src/settings/OptionsLayout')
-rw-r--r-- | modern/src/settings/OptionsLayout/useRoutes.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modern/src/settings/OptionsLayout/useRoutes.js b/modern/src/settings/OptionsLayout/useRoutes.js index efbd9eb2..70662e4d 100644 --- a/modern/src/settings/OptionsLayout/useRoutes.js +++ b/modern/src/settings/OptionsLayout/useRoutes.js @@ -9,7 +9,6 @@ import BuildIcon from '@material-ui/icons/Build'; import PeopleIcon from '@material-ui/icons/People'; import BarChartIcon from '@material-ui/icons/BarChart'; import TodayIcon from '@material-ui/icons/Today'; -import { getIsAdmin, getUserId } from '../../common/selectors'; import { useTranslation } from '../../LocalizationProvider'; const useAdminRoutes = (t) => useMemo(() => [ @@ -84,8 +83,8 @@ const useMainRoutes = (t, userId) => useMemo(() => [ export default () => { const t = useTranslation(); - const isAdmin = useSelector(getIsAdmin); - const userId = useSelector(getUserId); + const isAdmin = useSelector((state) => state.session.user?.administrator); + const userId = useSelector((state) => state.session.user?.id); const mainRoutes = useMainRoutes(t, userId); const adminRoutes = useAdminRoutes(t); |