Skip to content

AdminNotFound

AdminNotFound(props): Element

Defined in: packages/react/src/admin/AdminNotFound.tsx:63

Shared not-found state (Polish Decision 10), in ListViewEmptyState’s own visual style (icon, title, detail line, one action button — flex flex-col items-center gap-2 py-12 text-center) — replaces every “TODO: add not found view” text block.

Exported from @vexcms/react’s main entry, NOT @vexcms/react/server (developer-binding, production-build-reported — moved back here after a round trip through the server entry): the back button uses VexLink for genuine in-app navigation (no full page reload), and VexLink depends on useFrameworkComponents — a createContext-backed hook. VexLink itself correctly carries its own "use client", but tsup bundles @vexcms/react/server’s entire reachable graph into ONE output file; a single file can carry only one top-level "use client" directive, so bundling VexLink’s code into that server-only entry’s own output flattened the boundary away — Next’s PRODUCTION build (next build’s static RSC analysis, never exercised by next dev) then saw createContext reachable from a module with no "use client" of its own and failed (pnpm check:vercel’s pristine-clone check is what caught it). Rendering this from NextAdminPage (a Server Component) costs nothing: every other view (AdminTopNav/CollectionListView/etc.) is ALSO a client component rendered the same way — React still renders a client component’s own output into the initial server-rendered HTML, zero layout shift, only ITS interactivity hydrates after.

AdminNotFoundProps

Component props. See AdminNotFoundProps.

Element

A centered icon/title/detail/button block, same frame as ListViewEmptyState.

<AdminNotFound
variant="collection"
detail={`Collection "${collectionSlug}" doesn't exist.`}
backHref="/admin"
backLabel="Back to dashboard"
/>