import { useLocation, useParams } from "react-router-dom" import { PageHeader } from "@/components/page-header" import { PrimaryPageTemplate } from "@/components/templates/primary-page-template" import { useProduct } from "@/contexts/product-context" import { prismHubMetaForSegment } from "@/lib/prism-hub-meta" import { oneSchoolsHubMetaForSegment } from "@/lib/one-schools-hub-meta" import { oneSitesHubMetaForSegment } from "@/lib/one-sites-hub-meta" import { getRegisteredProductBySlug } from "@exxatdesignux/product-framework" import { customProductSlugFromSuffix } from "@/lib/product-routing" /** * Generic hub placeholder for tenant product routes under * `/:productRootSegment//*`. Renders DS chrome + an empty body until * the hub ships a real `ListPageTemplate` surface. */ export default function ProductShellPlaceholder() { const { pathname } = useLocation() const { productRootSegment = "" } = useParams() const { customProducts, activeCustomIndex, product } = useProduct() const registered = getRegisteredProductBySlug(productRootSegment) const brand = customProducts[activeCustomIndex] const slug = registered?.slug ?? (brand?.suffix?.trim() ? customProductSlugFromSuffix(brand.suffix) : productRootSegment) const pathSegments = pathname.split("/").filter(Boolean) const hubSegment = pathSegments[1] ?? productRootSegment const meta = product === "exxat-one-schools" ? oneSchoolsHubMetaForSegment(hubSegment) : product === "exxat-one-sites" ? oneSitesHubMetaForSegment(hubSegment) : prismHubMetaForSegment(hubSegment) return (

{meta.title} is not built in this workspace yet. Wire a{" "} ListPageTemplate hub at{" "} /{slug}/{hubSegment}{" "} when you are ready.

) }