spb/cancerindex
Public
TypeScript 97.2%
SQL 1.5%
CSS 0.6%
JavaScript 0.5%
1import { ogImage, OG_SIZE, OG_CONTENT_TYPE } from '@/lib/og';2import { getSiteCounts } from '@/lib/queries/stats';3import { fmtInt } from '@/lib/format';45export const alt = 'CancerIndex — the global index of cancer';6export const size = OG_SIZE;7export const contentType = OG_CONTENT_TYPE;8export const revalidate = 3600;910/** Site-wide share image: live database counts (never estimates), refreshed hourly. */11export default async function Image() {12 const c = await getSiteCounts();13 const facts = [14 c.cancers ? { label: 'cancers indexed', value: fmtInt(c.cancers) } : null,15 c.activeTrials ? { label: 'active trials', value: fmtInt(c.activeTrials) } : null,16 c.approvedDrugs ? { label: 'approved drugs', value: fmtInt(c.approvedDrugs) } : null,17 c.genes ? { label: 'genes', value: fmtInt(c.genes) } : null,18 ].filter((f): f is { label: string; value: string } => !!f);19 return ogImage({20 kicker: 'Global cancer intelligence',21 title: 'Understand cancer through data.',22 subtitle: 'Epidemiology, genomics, biomarkers, drugs, approvals, trials and research, cross-linked across every recognized cancer entity.',23 facts,24 sourcesNote: 'live database counts',25 });26}27