import { DriverIdentity } from '@/ui/DriverIdentity'; import { DriverViewModel } from '@/lib/view-models/DriverViewModel'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { ReactNode } from 'react'; interface TeamRosterItemProps { driver: DriverViewModel; href: string; roleLabel: string; joinedAtLabel: string; ratingLabel: string | null; overallRankLabel: string | null; actions?: ReactNode; } export function TeamRosterItem({ driver, href, roleLabel, joinedAtLabel, ratingLabel, overallRankLabel, actions, }: TeamRosterItemProps) { return ( {driver.country} • Joined {joinedAtLabel} } size="md" /> {ratingLabel !== null && ( {ratingLabel} Rating {overallRankLabel !== null && ( {overallRankLabel} Rank )} )} {actions && ( {actions} )} ); }