'use client'; import { CountryFlagDisplay } from '@/lib/display-objects/CountryFlagDisplay'; import { Image } from '@/ui/Image'; import { ResultRow, PositionBadge, ResultPoints } from '@/ui/ResultRow'; import { Text } from '@/ui/Text'; import { Badge } from '@/ui/Badge'; import { Box } from '@/ui/Box'; import { Group } from '@/ui/Group'; import { Stack } from '@/ui/Stack'; import { Surface } from '@/ui/Surface'; import React from 'react'; interface ResultEntry { position: number; driverId: string; driverName: string; driverAvatar: string; country: string; car: string; laps: number; time: string; fastestLap: string; points: number; incidents: number; isCurrentUser: boolean; } interface RaceResultRowProps { result: ResultEntry; points: number; } export function RaceResultRow({ result, points }: RaceResultRowProps) { const { isCurrentUser, position, driverAvatar, driverName, country, car, laps, incidents, time, fastestLap } = result; return ( {/* Avatar */} {driverName} {CountryFlagDisplay.fromCountryCode(country).toString()} {/* Driver Info */} {driverName} {isCurrentUser && ( YOU )} {car} Laps: {laps} Incidents: {incidents} {/* Times */} {time} FL: {fastestLap} {/* Points */} ); }