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;