From f0defcbaa12a7a4da1fa29729982bc0acd496fab Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:32:32 +0000 Subject: [PATCH] Changes --- src/App.tsx | 2 + src/components/Sidebar.tsx | 10 +- src/components/TerminalCommand.tsx | 2 +- src/contexts/MusicContext.tsx | 51 +++- src/pages/Games.tsx | 45 ++++ src/pages/SnakeMultiplayer.tsx | 364 +++++++++++++++++++++++++++++ 6 files changed, 460 insertions(+), 14 deletions(-) create mode 100644 src/pages/SnakeMultiplayer.tsx 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 */} -