"use client"; import type { ComponentProps, ReactNode } from "react"; import { usePathname } from "next/navigation"; import { TopNavbar } from "@/components/top-navbar"; type AdminLayoutShellProps = ComponentProps & { children: ReactNode; }; function shouldHideSidebarChrome(pathname: string) { return pathname === "/settings" || pathname.startsWith("/settings/"); } export function AdminLayoutShell({ children, ...topNavbarProps }: AdminLayoutShellProps) { const pathname = usePathname(); const hideSidebarChrome = shouldHideSidebarChrome(pathname); return (
{hideSidebarChrome ? null : }
{children}
); }