import { PageHeader } from "@/components/PageHeader"; import { RecordLink } from "@/components/RecordLink"; import type { EntityView, RelationItem } from "@/lib/catalog"; /** * Generic record page: title, summary, sources, claims, and neighbouring relations. * OnCo EntityDetail was not copied. That file special-cases domain panels. */ function RelationBlock({ headingId, title, relations, }: { headingId: string; title: string; relations: RelationItem[]; }) { return (

{title}

{relations.length === 0 ? (

No {title.toLowerCase()} relations.

) : ( )}
); } export function EntityDetail({ entity }: { entity: EntityView }) { const currentIndex = entity.readingPath.findIndex((step) => step.id === entity.id); return ( <>
{entity.glossary ? (

{entity.glossary}

) : null}

{entity.summary}

{entity.tags.length > 0 ? ( ) : null} {entity.readingPath.length > 0 ? ( ) : null}

Sources

{entity.sources.length === 0 ? (

No sources.

) : (
    {entity.sources.map((source) => (
  • {source.title} {source.license ? · {source.license} : null} {source.attribution ? (

    {source.uri ? {source.attribution} : source.attribution} {source.licenseUrl ? <> · {source.license} : null} {source.retrievedAt ? <> · retrieved {source.retrievedAt} : null} {source.originSha ? <> · origin {source.originSha} : null} {source.license === "CC-BY-NC-4.0" ? <> · NonCommercial : null} {source.modificationNotice ? <> · {source.modificationNotice} : null}

    ) : null}
  • ))}
)}

Claims

{entity.claims.length === 0 ? (

No claims.

) : (
    {entity.claims.map((claim) => (
  • {claim.key} · {claim.status} {claim.value ? · {claim.value} : null}
  • ))}
)}

Relations

{entity.relationRemainder > 0 ? (

{entity.relationRemainder} more relations are not listed.

) : null}
{entity.collection ? (

{entity.collection.title}

{entity.collection.members.length === 0 ? (

No members.

) : (
    {entity.collection.members.map((member) => (
  • ))}
)}
) : null} {entity.related.length > 0 ? (
    {entity.related.map((item) => (
  • ))}
) : null}

Open graph {" · "} Back to {entity.kindLabel}

); }