import { DriverIdentity } from '@/components/drivers/DriverIdentity'; import { DriverViewModel } from '@/lib/view-models/DriverViewModel'; import { Stack } from '@/ui/primitives/Stack'; import { Text } from '@/ui/Text'; import { ReactNode } from 'react'; interface TeamRosterItemProps { driver: DriverViewModel; href: string; roleLabel: string; joinedAt: string | Date; rating: number | null; overallRank: number | null; actions?: ReactNode; } export function TeamRosterItem({ driver, href, roleLabel, joinedAt, rating, overallRank, actions, }: TeamRosterItemProps) { return ( {driver.country} • Joined {new Date(joinedAt).toLocaleDateString()} } size="md" /> {rating !== null && ( {rating} Rating {overallRank !== null && ( #{overallRank} Rank )} )} {actions && ( {actions} )} ); }