From ffc59053096c579532872620bfcaf3900e316a3c Mon Sep 17 00:00:00 2001 From: dmitriylaukhin Date: Mon, 8 Jun 2026 09:58:15 +0500 Subject: [PATCH] Make admin/curator sidebar collapsible on mobile The admin shell sidebar was always fixed at 208px with no mobile handling, so on phones it covered half the screen with no way to hide it. Add a hamburger toggle + overlay (mirroring the student course sidebar): off-canvas on --- src/components/admin/admin-shell.tsx | 40 +++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/components/admin/admin-shell.tsx b/src/components/admin/admin-shell.tsx index 8b388be..5e1370b 100644 --- a/src/components/admin/admin-shell.tsx +++ b/src/components/admin/admin-shell.tsx @@ -1,3 +1,7 @@ +"use client"; + +import { useState } from "react"; +import { Menu, X } from "lucide-react"; import { AdminNav } from "@/components/admin/admin-nav"; import { LogoutButton } from "@/components/layout/logout-button"; @@ -10,10 +14,38 @@ export function AdminShell({ userName: string; questionsBadge?: number; }) { + const [open, setOpen] = useState(false); + return (
+ {/* Mobile hamburger */} + + + {/* Overlay */} + {open && ( +
setOpen(false)} + /> + )} + -
+ +
{children}