From d1217c7ed738244859ac7d491260f6d43a4110e1 Mon Sep 17 00:00:00 2001 From: JorySeverijnse Date: Sat, 3 Jan 2026 00:17:38 +0100 Subject: [PATCH] Fixed the layout of the mobile screen on all /games --- src/components/MainLayout.tsx | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/components/MainLayout.tsx b/src/components/MainLayout.tsx index 1033748..113a5e6 100644 --- a/src/components/MainLayout.tsx +++ b/src/components/MainLayout.tsx @@ -5,38 +5,45 @@ import { MiniOscilloscope } from './MiniOscilloscope'; const MainLayout = () => { const location = useLocation(); + const isMobile = typeof window !== 'undefined' && window.innerWidth < 768; // Don't show mini oscilloscope on the oscilloscope page itself const showMiniOscilloscope = location.pathname !== '/oscilloscope'; + // Check if on game page and mobile + const isMobileGamePage = isMobile && location.pathname.startsWith('/games/') && location.pathname !== '/games' && location.pathname !== '/games/leaderboard'; return ( - {/* Branding */} - - ~$ whoami Jory - + {!isMobileGamePage && ( + <> + {/* Branding */} + + ~$ whoami Jory + + + )} {/* Main Container */} -
- +
+ {!isMobileGamePage && } {/* Content Area */} -
+
{/* Mini Oscilloscope Bar */} - {showMiniOscilloscope && } + {showMiniOscilloscope && !isMobileGamePage && } ); };