PageLayout.js
5.04 KB
-
📱 feat(ui): auto-close sidebar on mobile after menu navigation · c4718a1eAdds a smoother mobile experience by automatically closing the sidebar drawer once a menu item is tapped. ### Details * SiderBar * Introduce `onNavigate` prop and invoke it on every `<Link>` click. * Remove unused `useIsMobile` hook and related `isMobile` variable. * PageLayout * Pass `onNavigate` callback to `SiderBar` that sets `drawerOpen` to `false` when on mobile, ensuring the sidebar collapses after navigation. This eliminates the “isMobile declared but never used” warning and aligns the behaviour of the sidebar with common mobile UX expectations.t0ng7u committed