Files
GMW/services/frontend/src/components/dashboard/hourly-activity-chart.tsx
T
asepharyana 5bbf75a65b refactor(frontend): finish shadcn→custom primitive migration (green build)
- Remove tw-animate-css import + dead src/components/ui shadcn tree
- Convert 7 orphaned components (moderation, analysis, guild-selector,
  voice/activity-timeline, shared/empty+error) to new primitives
- Add missing moderation/view.tsx; analysis uses SearchPanel directly
- globals.css now uses new signal-driven ops-console tokens
- tsc --noEmit clean, next build green (11 routes), local smoke 200
2026-08-14 10:49:44 +07:00

30 lines
889 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { AreaPoint } from "@/components/charts/area-activity";
import { AreaActivity } from "@/components/charts/area-activity";
export interface HourlyActivityChartProps {
data: { hour: number; messages: number; flagged: number }[];
}
export function HourlyActivityChart({ data }: HourlyActivityChartProps) {
const points: AreaPoint[] = data.map((d) => ({
label: `${d.hour}:00`,
value: d.messages,
}));
return (
<div className="surface p-4">
<div className="mb-3 flex items-center justify-between">
<h3 className="text-sm font-semibold">Hourly distribution</h3>
<span className="text-xs text-[var(--color-ink-soft)]">
00:00 23:00
</span>
</div>
<AreaActivity
data={points}
height={140}
stroke="var(--color-amber)"
label="Hourly message activity"
/>
</div>
);
}