feat(dashboard): more type safety

This commit is contained in:
2025-11-17 01:26:33 +02:00
parent f39635e04f
commit 22aab9ffc6
25 changed files with 120 additions and 71 deletions
@@ -5,11 +5,11 @@ import { Bar, BarChart as BaseBarChart, CartesianGrid, XAxis } from "recharts";
import { formatDate } from "#dashboard/utils/utils";
type BarChartProps = {
data: unknown;
type BarChartProps<T> = {
data: T[];
};
export function BarChart({ data }: BarChartProps) {
export function BarChart<T>({ data }: BarChartProps<T>) {
return (
<BaseBarChart accessibilityLayer data={data}>
<CartesianGrid vertical={false} />