diff --git a/src/App.tsx b/src/App.tsx index d99ee67..d92d622 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -29,6 +29,7 @@ const Leaderboard = lazy(() => import("./pages/Leaderboard")); const Tetris = lazy(() => import("./pages/Tetris")); const Pacman = lazy(() => import("./pages/Pacman")); const Snake = lazy(() => import("./pages/Snake")); +const SnakeMultiplayer = lazy(() => import("./pages/SnakeMultiplayer")); const Breakout = lazy(() => import("./pages/Breakout")); const Music = lazy(() => import("./pages/Music")); const Oscilloscope = lazy(() => import("./pages/Oscilloscope")); @@ -124,6 +125,7 @@ const AppContent = () => { } /> } /> } /> + } /> } /> } /> } /> diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 611b54e..ebfa19c 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -29,6 +29,11 @@ const Sidebar = () => { const currentPage = navItems.find(item => item.path === location.pathname)?.label || 'Menu'; + // Close mobile menu when route changes + useEffect(() => { + setIsExpanded(false); + }, [location.pathname]); + // Check if footer is visible within the sidebar useEffect(() => { const checkFooterVisibility = () => { @@ -77,7 +82,7 @@ const Sidebar = () => { {/* Desktop Navigation - Always visible */} -