diff --git a/frontend/src/components/auth/SignedOutPanel.tsx b/frontend/src/components/auth/SignedOutPanel.tsx index e1c92264..f3912cfc 100644 --- a/frontend/src/components/auth/SignedOutPanel.tsx +++ b/frontend/src/components/auth/SignedOutPanel.tsx @@ -20,7 +20,7 @@ export function SignedOutPanel({ buttonTestId, }: SignedOutPanelProps) { return ( -
+

{message}

setSidebarOpen((v) => !v), []); + // Dismiss sidebar on Escape + useEffect(() => { + if (!sidebarOpen) return; + const onKey = (e: KeyboardEvent) => { + if (e.key === "Escape") setSidebarOpen(false); + }; + document.addEventListener("keydown", onKey); + return () => document.removeEventListener("keydown", onKey); + }, [sidebarOpen]); + return (
-
+
- + {isSignedIn ? ( + + ) : null}
@@ -120,10 +132,7 @@ export function DashboardShell({ children }: { children: ReactNode }) {
e.key === "Escape" && toggleSidebar()} - role="button" - tabIndex={-1} - aria-label="Close navigation" + aria-hidden="true" /> ) : null}