content-explorer/ui/components/OriginNotice.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

21 lines
1.1 KiB
TypeScript

import { originNotices } from "@/lib/catalog";
/** One credit line for each distinct origin. Pages that render the records use this. */
export function OriginNotice({ dataspaceId }: { dataspaceId: string }) {
const notices = originNotices(dataspaceId);
if (notices.length === 0) return null;
return (
<aside className="mx-auto max-w-7xl px-4 pt-6 text-sm text-muted sm:px-6" aria-label="Data origin">
{notices.map((source) => (
<p key={`${source.license}:${source.originSha ?? ""}:${source.attribution}`}>
{source.uri ? <a className="underline" href={source.uri}>{source.attribution}</a> : source.attribution}
{source.licenseUrl ? <> · <a className="underline" href={source.licenseUrl}>{source.license}</a></> : <> · {source.license}</>}
{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}
</p>
))}
</aside>
);
}