I have to following routes for the settings page (inside the <Route path="settings/*">
):
<Routes>
<Route index path="account" element={<AccountDetails />} />
<Route path="password" element={<ChangePassword />} />
<Route path="notifications" element={<Notifications />} />
<Route
path="platform-settings"
element={!canManageAllEnvironments ? <Navigate to=".. " /> : <Outlet />}
>
<Route index element={<PlatformGeneralSettings />} />
<Route path="roles-and-permissions" element={<RolesAndPermissions />} />
<Route path="banners" element={<Banners />} />
<Route path="notifications" element={<EmailNotifications />} />
<Route path="certificates" element={<Certificates />} />
</Route>
<Route path="*" element={<Navigate to="." />} />
</Routes>
The account subpage is the index page, so if the user goes to the /settings/
route or the /settings/account
route, they should see the account details subpage. Currently, if the route is settings/
, nothing is being rendered although I am adding the index property in the account route. How should I deal with this case?
Expected to see the account subpage on /settings/
and /settings/account/
routes!
jBailony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.