diff --git a/src/app/dashboard-client.tsx b/src/app/dashboard-client.tsx index 544e4e1..df861a6 100644 --- a/src/app/dashboard-client.tsx +++ b/src/app/dashboard-client.tsx @@ -422,7 +422,7 @@ function buildDailySpendData(breakdown: SpendBreakdownRow[]): { const point = byDate.get(row.date) as Record; const firstName = row.name.split(" ")[0] ?? row.name; const dollars = row.spend_cents / 100; - point.total += dollars; + point.total = (point.total ?? 0) + dollars; if (topNames.includes(firstName)) { point[firstName] = (point[firstName] as number) + dollars; } else { diff --git a/src/app/insights/insights-client.tsx b/src/app/insights/insights-client.tsx index 5b8ecb5..096b7a1 100644 --- a/src/app/insights/insights-client.tsx +++ b/src/app/insights/insights-client.tsx @@ -150,7 +150,7 @@ export function InsightsClient({ data }: { data: InsightsData }) { if (!byDate.has(entry.date)) byDate.set(entry.date, { _total: 0 }); const row = byDate.get(entry.date) as Record; row[model] = (row[model] ?? 0) + entry.messages; - row._total += entry.messages; + row._total = (row._total ?? 0) + entry.messages; } const result: Array> = []; for (const [date, row] of [...byDate.entries()].sort((a, b) => a[0].localeCompare(b[0]))) { @@ -658,7 +658,7 @@ function ModelEfficiencySection({ data }: { data: ModelEfficiencyEntry[] }) { `${v}%`} + formatter={(v) => `${v ?? ""}%`} style={{ fontSize: 10, fill: "#a1a1aa", fontFamily: "monospace" }} /> diff --git a/src/components/dashboard/members-table.tsx b/src/components/dashboard/members-table.tsx index 48ed1f5..11ed480 100644 --- a/src/components/dashboard/members-table.tsx +++ b/src/components/dashboard/members-table.tsx @@ -21,7 +21,7 @@ function rankBadge(rank: number) { return `#${rank}`; } -function SortIcon({ active, asc }: { active: boolean; asc: boolean }) { +function SortIcon({ active, asc }: { col?: string; active: boolean; asc: boolean }) { if (!active) return ; return {asc ? "↑" : "↓"}; }