'use client'; import { Button } from '@/ui/Button'; import { Heading } from '@/ui/Heading'; import { Group } from '@/ui/Group'; 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 { totalDriversLabel: string; activeDriversLabel: string; totalWinsLabel: string; totalRacesLabel: string; onViewLeaderboard: () => void; } export function DriversDirectoryHeader({ totalDriversLabel, activeDriversLabel, totalWinsLabel, totalRacesLabel, onViewLeaderboard, }: DriversDirectoryHeaderProps) { const stats: DriverStat[] = [ { label: 'drivers', value: totalDriversLabel, intent: 'primary' }, { label: 'active', value: activeDriversLabel, intent: 'success' }, { label: 'total wins', value: totalWinsLabel, intent: 'warning' }, { label: 'races', value: totalRacesLabel, 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
); }