import { cn } from "@suphark/ui/lib/utils"; import { type ReactNode, Suspense } from "react"; import { PageBreadcrumb, type PageBreadcrumbItem } from "../navigation/page-breadcrumb"; interface PageShellProps { title?: string; description?: string; breadcrumb?: PageBreadcrumbItem[]; actions?: ReactNode; /** เมนูใต้หัวหน้า (แท็บย่อยของหมวด ฯลฯ) — render พร้อมหัวหน้า นอก Suspense */ subNav?: ReactNode; children: ReactNode; fallback: ReactNode; className?: string; } /** * PageShell - A standard template for implementing the Parallel Shell & Static Header Pattern. * It renders the static header (title, description, breadcrumbs) immediately to the browser * while wrapping the dynamic children in a Suspense boundary for non-blocking streaming. */ export function PageShell({ title, description, breadcrumb, actions, subNav, children, fallback, className, }: PageShellProps) { return (
{description}
}