diff --git a/admin/src/components/Layout.tsx b/admin/src/components/Layout.tsx index df0fe68..863a692 100644 --- a/admin/src/components/Layout.tsx +++ b/admin/src/components/Layout.tsx @@ -4,6 +4,7 @@ import { Building2, Dumbbell, LogOut, + Menu, ScrollText, ShieldCheck, Target, @@ -54,20 +55,46 @@ const SECTIONS: NavSection[] = [ }, ]; +const SIDEBAR_KEY = 'fitos-admin-sidebar-collapsed'; + +function readCollapsed(): boolean { + try { + return localStorage.getItem(SIDEBAR_KEY) === '1'; + } catch { + return false; + } +} + /* Wiersze nawigacji wg Ember: aktywny = tint akcentu + pionowy pasek przy krawędzi. */ -function NavLinks({ items, onNavigate }: { items: NavItem[]; onNavigate?: () => void }) { +function NavLinks({ + items, + collapsed, + onNavigate, +}: { + items: NavItem[]; + collapsed: boolean; + onNavigate?: () => void; +}) { return ( -