import { PageHeader } from "@/components/PageHeader";
import type { EntityView } from "@/lib/catalog";
/**
* Generic record page: title, summary, sources, claims, and neighbouring relations.
* OnCo EntityDetail was not copied. That file special-cases domain panels.
*/
export function EntityDetail({ entity }: { entity: EntityView }) {
return (
<>
{entity.summary}
{entity.tags.length > 0 ? (
{entity.tags.map((tag) => (
- {tag}
))}
) : null}
Sources
{entity.sources.length === 0 ? (
No sources.
) : (
{entity.sources.map((source) => (
-
{source.title}
{source.license ? · {source.license} : null}
))}
)}
Claims
{entity.claims.length === 0 ? (
No claims.
) : (
{entity.claims.map((claim) => (
-
{claim.key}
· {claim.status}
{claim.value ? · {claim.value} : null}
))}
)}
Relations
{entity.relations.length === 0 ? (
No relations.
) : (
{entity.relations.map((relation) => (
-
{relation.wording}
{" · "}
{relation.otherHref ? (
{relation.otherTitle}
) : (
relation.otherTitle
)}
))}
)}
Back to {entity.kindLabel}
>
);
}