"use client"; import type { WidgetData } from "@/lib/types"; export function GroupedCountsWidget({ data }: { data: WidgetData }) { const groups = data.groups ?? {}; const entries = Object.entries(groups).sort(([, a], [, b]) => b - a); const max = entries.length > 0 ? Math.max(...entries.map(([, c]) => c)) : 1; if (entries.length === 0) { return (
No data