import React from 'react'; import Card from '@/components/ui/Card'; import { StandingEntryViewModel } from '@/lib/view-models/StandingEntryViewModel'; import { DriverViewModel } from '@/lib/view-models/DriverViewModel'; interface LeagueChampionshipStatsProps { standings: StandingEntryViewModel[]; drivers: DriverViewModel[]; } export default function LeagueChampionshipStats({ standings, drivers }: LeagueChampionshipStatsProps) { if (standings.length === 0) return null; const leader = standings[0]; const totalRaces = Math.max(...standings.map(s => s.races), 0); return (
🏆

Championship Leader

{drivers.find(d => d.id === leader?.driverId)?.name || 'N/A'}

{leader?.points || 0} points

🏁

Races Completed

{totalRaces}

Season in progress

👥

Active Drivers

{standings.length}

Competing for points

); }