import type { RegionDistributionEntry } from '../../services/stats.services' interface RegionRankingProps { shortLabel: string color: string regions: RegionDistributionEntry[] formatValue: (value: number) => string } export default function RegionRanking({ shortLabel, color, regions, formatValue }: RegionRankingProps) { const sorted = [...regions].sort((a, b) => b.total_amount - a.total_amount) const top5 = sorted.slice(0, 5) const maxAmount = top5[0]?.total_amount ?? 1 return (