aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-17 11:51:27 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-17 11:51:27 -0700
commite470eeb4fcc923bc54968a6561f66c75dab288b9 (patch)
treefe17741ad65384e63d299426ae765b1e9fa3acfe /modern/src/settings
parent2054cc9d11d77d7883a5858bcbcc3833aed4b874 (diff)
downloadtrackermap-web-e470eeb4fcc923bc54968a6561f66c75dab288b9.tar.gz
trackermap-web-e470eeb4fcc923bc54968a6561f66c75dab288b9.tar.bz2
trackermap-web-e470eeb4fcc923bc54968a6561f66c75dab288b9.zip
Remove selectors file
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/OptionsLayout/useRoutes.js5
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);