fix(unit-3): Add settings/profile routes, move profile to UserMenu
- Add /settings (Owner only) and /profile routes under authenticatedRoute so sidebar stays visible and layout is preserved - Create SettingsPage and ProfilePage placeholder components (coming soon) - Remove Profile nav item from Sidebar — profile now accessible via UserMenu - Add Profile link to UserMenu dropdown above logout - Update Sidebar tests to reflect profile-free nav Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
+17
-1
@@ -189,12 +189,28 @@ const cmsRoute = createRoute({
|
||||
),
|
||||
});
|
||||
|
||||
const settingsRoute = createRoute({
|
||||
getParentRoute: () => authenticatedRoute,
|
||||
path: '/settings',
|
||||
component: () => (
|
||||
<RoleGuard allowedRoles={['Owner']}>
|
||||
{lazyPage(() => import('@/pages/SettingsPage'), 'SettingsPage')()}
|
||||
</RoleGuard>
|
||||
),
|
||||
});
|
||||
|
||||
const profileRoute = createRoute({
|
||||
getParentRoute: () => authenticatedRoute,
|
||||
path: '/profile',
|
||||
component: lazyPage(() => import('@/pages/ProfilePage'), 'ProfilePage'),
|
||||
});
|
||||
|
||||
export const routeTree = rootRoute.addChildren([
|
||||
indexRoute,
|
||||
loginRoute,
|
||||
setupRoute,
|
||||
inviteCompleteRoute,
|
||||
authenticatedRoute.addChildren([dashboardRoute, usersRoute, cmsRoute]),
|
||||
authenticatedRoute.addChildren([dashboardRoute, usersRoute, cmsRoute, settingsRoute, profileRoute]),
|
||||
]);
|
||||
|
||||
export const router = createRouter({
|
||||
|
||||
Reference in New Issue
Block a user