Add admin guard to settings route, conditionally render config option
This commit is contained in:
1 parent
eedf2879ee
commit
0a11de47d7
2 files changed
+38
-31
No files matched your search
+2
-1
@@ -39,6 +39,7 @@ function App() {
|
||||
const DetailsWithAdminProp = withAdminProp(Details);
|
||||
const PageSpeedWithAdminProp = withAdminProp(PageSpeed);
|
||||
const MaintenanceWithAdminProp = withAdminProp(Maintenance);
|
||||
const SettingsWithAdminProp = withAdminProp(Settings);
|
||||
|
||||
const mode = useSelector((state) => state.ui.mode);
|
||||
|
||||
@@ -90,7 +91,7 @@ function App() {
|
||||
/>
|
||||
<Route
|
||||
path="settings"
|
||||
element={<ProtectedRoute Component={Settings} />}
|
||||
element={<ProtectedRoute Component={SettingsWithAdminProp} />}
|
||||
/>
|
||||
<Route
|
||||
path="account/profile"
|
||||
|
||||
Reference in new issue
Block a user