content-explorer/ui/components/DataspaceHome.tsx
tegwick f8c94d3272
All checks were successful
synthetic / suite (push) Successful in 56s
Finish the computing-basics pilot and the local OnCo reference slice.
The single-operator pilot keeps static projection. Local OnCo use requires a CC BY-NC origin notice, and the slice stays out of public CI.

Assistant: grok
Assistant-Session: 01a15378-f601-7fe2-a143-8e1500a1d59c
2026-10-19 13:04:55 +02:00

33 lines
1.2 KiB
TypeScript

import { Hero } from "@/components/Hero";
import { OriginNotice } from "@/components/OriginNotice";
import { RecordBrowser } from "@/components/RecordBrowser";
import { findDataspace, listNavigation } from "@/lib/catalog";
import { notFound } from "next/navigation";
export function DataspaceHome({ id }: { id: string }) {
const dataspace = findDataspace(id);
if (!dataspace) notFound();
const others = listNavigation().filter((item) => item.id !== dataspace.id);
return (
<>
<Hero
dataspace={dataspace.title}
description={dataspace.description}
kinds={dataspace.kinds.map((kind) => ({ href: kind.href, label: kind.plural }))}
/>
{others.length > 0 ? (
<p className="mx-auto max-w-7xl px-4 pt-8 text-sm text-muted sm:px-6">
Other fields:{" "}
{others.map((item, index) => (
<span key={item.id}>
{index > 0 ? ", " : null}
<a className="underline" href={`/${item.id}/`}>{item.title}</a>
</span>
))}
</p>
) : null}
<OriginNotice dataspaceId={dataspace.id} />
<RecordBrowser rows={dataspace.rows} columns={dataspace.columns} />
</>
);
}