From e470eeb4fcc923bc54968a6561f66c75dab288b9 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 17 Apr 2022 11:51:27 -0700 Subject: Remove selectors file --- modern/src/settings/OptionsLayout/useRoutes.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modern/src/settings') 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); -- cgit v1.2.3