diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx index 4701cd8..b31d356 100644 --- a/src/components/layout/Navbar.tsx +++ b/src/components/layout/Navbar.tsx @@ -24,6 +24,12 @@ export function Navbar() { return () => window.removeEventListener('scroll', handle) }, []) + useEffect(() => { + setMobileOpen(false) + // Intentionally only depends on pathname — setter is stable + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [pathname]) + return (