"use client" import * as React from "react" import { ensureShippedCatalogLoaded } from "@exxatdesignux/product-framework/tenant-products/shipped-catalog" /** * True after `public/tenant-products.json` has been fetched (or skipped on 404). * Pair with {@link usePersistHydrated} before resolving custom product routes. */ export function useShippedCatalogReady(): boolean { const [ready, setReady] = React.useState(false) React.useEffect(() => { let cancelled = false void ensureShippedCatalogLoaded().finally(() => { if (!cancelled) setReady(true) }) return () => { cancelled = true } }, []) return ready }