Add registry kind indexes and entity pages.
CONTENT-WP-0002-T02 reads kinds from each snapshot and serves both example dataspaces without oncology imports. Assistant: grok Assistant-Session: 01a1346c-fdff-7741-b1af-b7283661554b
This commit is contained in:
parent
a6e360aaa5
commit
e16aa03393
21 changed files with 608 additions and 59 deletions
15
ui/components/KindIndex.tsx
Normal file
15
ui/components/KindIndex.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { RecordBrowser } from "@/components/RecordBrowser";
|
||||
import { PageHeader } from "@/components/PageHeader";
|
||||
import type { KindView } from "@/lib/catalog";
|
||||
|
||||
/** Kind directory. The heading and rows come from the snapshot kind registry. */
|
||||
export function KindIndex({ kind }: { kind: KindView }) {
|
||||
const count = kind.rows.length;
|
||||
const lede = count === 1 ? `1 record in ${kind.dataspaceTitle}.` : `${count} records in ${kind.dataspaceTitle}.`;
|
||||
return (
|
||||
<>
|
||||
<PageHeader kicker={kind.dataspaceTitle} title={kind.plural} lede={lede} />
|
||||
<RecordBrowser rows={kind.rows} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue