import Card from '@/components/ui/Card'; import RankBadge from '@/components/drivers/RankBadge'; import DriverIdentity from '@/components/drivers/DriverIdentity'; import type { DriverDTO } from '@gridpilot/racing/application/dto/DriverDTO'; export interface DriverCardProps { id: string; name: string; rating: number; skillLevel: 'beginner' | 'intermediate' | 'advanced' | 'pro'; nationality: string; racesCompleted: number; wins: number; podiums: number; rank: number; onClick?: () => void; } export default function DriverCard(props: DriverCardProps) { const { id, name, rating, nationality, racesCompleted, wins, podiums, rank, onClick, } = props; const driver: DriverDTO = { id, iracingId: '', name, country: nationality, joinedAt: '', }; return (
{rating}
Rating
{wins}
Wins
{podiums}
Podiums
{racesCompleted > 0 ? ((wins / racesCompleted) * 100).toFixed(0) : '0'}%
Win Rate
); }