diff --git a/frontend/src/shared/layouts/DashboardLayout/Sidebar.tsx b/frontend/src/shared/layouts/DashboardLayout/Sidebar.tsx index 8b696c785..c20ba18ca 100644 --- a/frontend/src/shared/layouts/DashboardLayout/Sidebar.tsx +++ b/frontend/src/shared/layouts/DashboardLayout/Sidebar.tsx @@ -265,6 +265,10 @@ export function Sidebar() { const isPathActive = (to: string) => pathname === to const isBaseActive = (basePath: string) => pathname === basePath || pathname.startsWith(basePath + '/') + const overviewItem = sections + .flatMap((section) => section.items) + .find((item): item is LeafItem => !isGroup(item) && item.to === '/home') + const renderOverviewWithToggle = !collapsed && overviewItem // Drill-down: when navigating under /settings the sidebar swaps to a sub-nav. if (pathname.startsWith('/settings')) { @@ -278,10 +282,25 @@ export function Sidebar() { collapsed ? 'w-14' : 'w-60' )} > -