// Admin overview โ€” URL `/admin`. `renderMode: 'ssr'` so the parent layout's // auth gate runs per request. Renders one card per discovered entity, each // linking to its CRUD page. The whole list comes from the api's capability map // โ€” there's no hard-coded entity list. import type { ReactNode } from 'react' import type { PageMeta } from '@voltro/web' import { useCapabilityManifest, deriveEntityAdmins } from '@voltro/client' import { T } from '@voltro/i18n' import { getCatalog } from '../../locales' export const renderMode = 'ssr' as const export const meta = ({ locale }: { readonly locale: string }): PageMeta => ({ title: getCatalog(locale)['meta.overview.title'], }) export default function AdminOverview(): ReactNode { const { manifest, loading, error } = useCapabilityManifest('app') const entities = manifest ? deriveEntityAdmins(manifest) : [] return (

{c} }} />

{error ? (

) : null} {loading && entities.length === 0 ? (
) }