import { ogImage, OG_SIZE, OG_CONTENT_TYPE } from '@/lib/og'; import { getSiteCounts } from '@/lib/queries/stats'; import { fmtInt } from '@/lib/format'; export const alt = 'CancerIndex — the global index of cancer'; export const size = OG_SIZE; export const contentType = OG_CONTENT_TYPE; export const revalidate = 3600; /** Site-wide share image: live database counts (never estimates), refreshed hourly. */ export default async function Image() { const c = await getSiteCounts(); const facts = [ c.cancers ? { label: 'cancers indexed', value: fmtInt(c.cancers) } : null, c.activeTrials ? { label: 'active trials', value: fmtInt(c.activeTrials) } : null, c.approvedDrugs ? { label: 'approved drugs', value: fmtInt(c.approvedDrugs) } : null, c.genes ? { label: 'genes', value: fmtInt(c.genes) } : null, ].filter((f): f is { label: string; value: string } => !!f); return ogImage({ kicker: 'Global cancer intelligence', title: 'Understand cancer through data.', subtitle: 'Epidemiology, genomics, biomarkers, drugs, approvals, trials and research, cross-linked across every recognized cancer entity.', facts, sourcesNote: 'live database counts', }); }