Files
gridpilot.gg/apps/website/components/races/RaceStats.tsx
2026-01-18 22:55:55 +01:00

32 lines
894 B
TypeScript

import { StatGrid } from '@/ui/StatGrid';
import { CalendarDays, Clock, Trophy, Zap } from 'lucide-react';
import React from 'react';
interface RaceStatsProps {
stats: {
total: number;
scheduled: number;
running: number;
completed: number;
};
}
export function RaceStats({ stats }: RaceStatsProps) {
const mappedStats = [
{ label: 'Total', value: stats.total, icon: CalendarDays, intent: 'low' as const },
{ label: 'Scheduled', value: stats.scheduled, icon: Clock, intent: 'primary' as const },
{ label: 'Live Now', value: stats.running, icon: Zap, intent: 'success' as const },
{ label: 'Completed', value: stats.completed, icon: Trophy, intent: 'low' as const },
];
return (
<div style={{ marginTop: '1.5rem' }}>
<StatGrid
stats={mappedStats}
columns={{ base: 2, md: 4 }}
variant="box"
/>
</div>
);
}