"use client"; import { GlassPanel } from "@/components/primitives"; import { SectionHeader } from "@/components/shared"; import type { HourlyModeration } from "@/lib/types"; import { cn } from "@/lib/utils"; export function ModerationHeatmap({ hours }: { hours: HourlyModeration[] }) { const max = hours.reduce((m, h) => Math.max(m, h.total), 0); const intensity = (v: number) => { if (max <= 0) return "bg-white/5"; const t = Math.max(0, Math.min(1, v / max)); if (t < 0.25) return "bg-white/[0.06]"; if (t < 0.5) return "bg-signal/25"; if (t < 0.75) return "bg-signal/50"; return "bg-vermilion/60"; }; return (

Distribution of moderation actions across the day.

{hours.map((h) => (
{String(h.hour).padStart(2, "0")}:00
{h.total}
))}
); }