From 9edbfc2e1b0c0a47d069f27a5d9f0b71164ae4e0 Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 17 Jun 2026 14:20:11 -0600 Subject: [PATCH] feat(admin): add AdminShell with breakpoint-aware layout --- src/components/admin/AdminShell.tsx | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/components/admin/AdminShell.tsx diff --git a/src/components/admin/AdminShell.tsx b/src/components/admin/AdminShell.tsx new file mode 100644 index 0000000..cf0d148 --- /dev/null +++ b/src/components/admin/AdminShell.tsx @@ -0,0 +1,55 @@ +import { ReactNode } from "react"; +import AdminSidebar from "@/components/admin/AdminSidebar"; +import MobileTabBar from "@/components/admin/MobileTabBar"; +import OfflineBanner from "@/components/admin/OfflineBanner"; +import { useMediaQuery } from "@/lib/use-media-query"; // see Task 1.9 + +interface AdminShellProps { + userRole: string | null; + brandIds?: string[]; + activeBrandId?: string | null; + brands: { id: string; name: string; slug: string }[]; + enabledAddons?: Record; + children: ReactNode; +} + +export function AdminShell(props: AdminShellProps) { + const isDesktop = useMediaQuery("(min-width: 1024px)"); + + if (isDesktop) { + return ( + <> + +
+ {props.children} +
+ + ); + } + + return ( + <> + +
+ {props.children} +
+ + + ); +} + +export default AdminShell;