import type { Dictionary } from "@/lib/i18n"; import { formatElapsed } from "@/lib/time"; import type { GlobalStats } from "@/lib/types"; type StatsPanelProps = { showLead?: boolean; stats: GlobalStats; t: Dictionary; }; export default function StatsPanel({ showLead = true, stats, t }: StatsPanelProps) { const maxDistribution = Math.max(...Object.values(stats.winDistribution), 1); return (

{t.stats}

{showLead ?

{t.statsLead}

: null}

{t.distribution}

{Object.entries(stats.winDistribution).map(([bucket, value]) => (
{bucket === "7" ? "X" : bucket} {value}
))}
); } function Stat({ label, value }: { label: string; value: string }) { return (

{value}

{label}

); }