From 04387fcd0c05f3c5b8f0c91e3f87f21a60213493 Mon Sep 17 00:00:00 2001 From: lobo Date: Sat, 3 Oct 2026 10:37:35 +0200 Subject: [PATCH] fix(header): prevent mobile header overflow Reduce responsive padding and gaps below 640 px, move nav labels to lg breakpoint, and position the "view as" badge absolutely to prevent horizontal scroll on narrow phones (360-414 px). --- src/components/AppHeader.jsx | 15 ++++++++------- src/components/AppHeader.test.jsx | 2 +- src/pages/AdminBroadcastPage.jsx | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/AppHeader.jsx b/src/components/AppHeader.jsx index fb443fd..9bd43a1 100644 --- a/src/components/AppHeader.jsx +++ b/src/components/AppHeader.jsx @@ -36,7 +36,7 @@ const NAV_ITEMS = [ ]; const navLinkClass = (isActive) => cn( - 'flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors', + 'flex items-center gap-2 rounded-lg px-2 py-2 text-sm font-medium transition-colors sm:px-3', isActive ? 'bg-accent text-accent-foreground' : 'text-muted-foreground hover:bg-muted hover:text-foreground', @@ -104,28 +104,29 @@ export default function AppHeader({isAuthenticated, onLogout}) { return (
- - + + {/* On a narrow phone the menu and buttons need the room; the logo alone stays. */} - ToBePlayed + ToBePlayed {isAuthenticated && ( -