introduce zod schemas

This commit is contained in:
Fran Jurmanović
2025-09-24 20:07:57 +02:00
parent 0cbc6935db
commit 996f1a1385
43 changed files with 798 additions and 559 deletions

View File

@@ -14,16 +14,16 @@ interface SessionTypesChartProps {
data: SessionCount[];
}
export function SessionTypesChart({ data }: SessionTypesChartProps) {
const colors = [
'#3b82f6', // blue
'#10b981', // emerald
'#f59e0b', // amber
'#ef4444', // red
'#8b5cf6', // violet
'#06b6d4' // cyan
];
const colors = [
'#3b82f6', // blue
'#10b981', // emerald
'#f59e0b', // amber
'#ef4444', // red
'#8b5cf6', // violet
'#06b6d4' // cyan
];
export function SessionTypesChart({ data }: SessionTypesChartProps) {
const chartData = {
labels: data.map((item) => item.name),
datasets: [

View File

@@ -1,6 +1,6 @@
'use client';
import type { StateHistoryStats } from '@/lib/types/statistics';
import type { StateHistoryStats } from '@/lib/schemas/statistics';
import { PlayerCountChart } from './PlayerCountChart';
import { SessionTypesChart } from './SessionTypesChart';
import { DailyActivityChart } from './DailyActivityChart';