'use client'; import { Button } from '@/ui/Button'; import { Heading } from '@/ui/Heading'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Section } from '@/ui/Section'; import { Container } from '@/ui/Container'; import { Card } from '@/ui/Card'; import { Icon } from '@/ui/Icon'; import { Trophy, Users } from 'lucide-react'; interface DriverStat { label: string; value: string | number; intent?: 'primary' | 'success' | 'warning' | 'telemetry'; } interface DriversDirectoryHeaderProps { totalDrivers: number; activeDrivers: number; totalWins: number; totalRaces: number; onViewLeaderboard: () => void; } export function DriversDirectoryHeader({ totalDrivers, activeDrivers, totalWins, totalRaces, onViewLeaderboard, }: DriversDirectoryHeaderProps) { const stats: DriverStat[] = [ { label: 'drivers', value: totalDrivers, intent: 'primary' }, { label: 'active', value: activeDrivers, intent: 'success' }, { label: 'total wins', value: totalWins.toLocaleString(), intent: 'warning' }, { label: 'races', value: totalRaces.toLocaleString(), intent: 'telemetry' }, ]; return (
Drivers Meet the racers who make every lap count. From rookies to champions, track their journey and see who's dominating the grid. {stats.map((stat, index) => ( {stat.value} {stat.label} ))} See full driver rankings
); }