--- import { CREATIVE_COMMONS_LICENSES, type LICENSES, } from "@lib/collection/schemas"; import CC from "./licenses/CC.astro"; import WTFPL from "./licenses/WTFPL.astro"; import type { Person } from "@lib/collection/types"; export interface Props { title: string; holders: Person[]; years: number[]; license?: typeof LICENSES[number]; } let { license = "public domain" } = Astro.props; let Notice = undefined; if (license !== undefined) { if (license === "WTFPL") { Notice = WTFPL; } else if ( CREATIVE_COMMONS_LICENSES.some((x) => license.localeCompare(x) === 0) ) { Notice = CC; } } --- {Notice &&