import { routes } from '@/lib/routing/RouteConfig'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { LeaderboardItem } from '@/ui/LeaderboardItem'; import { LeaderboardList } from '@/ui/LeaderboardList'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Award, ChevronRight } from 'lucide-react'; const SKILL_LEVELS = [ { id: 'pro', label: 'Pro', color: 'text-yellow-400' }, { id: 'advanced', label: 'Advanced', color: 'text-purple-400' }, { id: 'intermediate', label: 'Intermediate', color: 'text-primary-blue' }, { id: 'beginner', label: 'Beginner', color: 'text-green-400' }, ]; const CATEGORIES = [ { id: 'beginner', label: 'Beginner', color: 'text-green-400' }, { id: 'intermediate', label: 'Intermediate', color: 'text-primary-blue' }, { id: 'advanced', label: 'Advanced', color: 'text-purple-400' }, { id: 'pro', label: 'Pro', color: 'text-yellow-400' }, { id: 'endurance', label: 'Endurance', color: 'text-orange-400' }, { id: 'sprint', label: 'Sprint', color: 'text-red-400' }, ]; interface LeaderboardPreviewProps { drivers: { id: string; name: string; avatarUrl?: string; nationality: string; rating: number; wins: number; skillLevel?: string; category?: string; }[]; onDriverClick: (id: string) => void; onNavigate: (href: string) => void; } export function LeaderboardPreview({ drivers, onDriverClick, onNavigate }: LeaderboardPreviewProps) { const top5 = drivers.slice(0, 5); return ( Top Drivers Highest rated competitors {top5.map((driver, index) => { const levelConfig = SKILL_LEVELS.find((l) => l.id === driver.skillLevel); const categoryConfig = CATEGORIES.find((c) => c.id === driver.category); const position = index + 1; return ( onDriverClick(driver.id)} /> ); })} ); }