aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/OptionsLayout/useRoutes.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/OptionsLayout/useRoutes.js')
-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);