import Link from "next/link"; import type { ReportIndexView } from "yt-dlp-transcript-common/lib/report/views"; import { EmptyState, Eyebrow, ReportName, dateLabel } from "./parts"; // The report index: `/reports/`, and a cited site's home page when it has more // than one report. One card per published report, in the site's order // (site.json `reports`): its name, subtitle and dates -- its counts and tally // are the report page's. `heading: null` draws no heading (the home page: the // header already names the site). export default function ReportIndex({ index, heading = "Reports", tagline, }: { index: ReportIndexView | null; heading?: string | null; tagline?: string; }) { const reports = index?.reports ?? []; if (reports.length === 0) { return This site has not published a report yet.; } return (
{(heading || tagline) && (
{heading &&

{heading}

} {tagline &&

{tagline}

}
)}
); }