'use client'; import { Badge } from '@/ui/Badge'; import { Icon } from '@/ui/Icon'; import { Link } from '@/ui/Link'; import { Text } from '@/ui/Text'; import { RaceCard, RaceTimeColumn, RaceInfo } from '@/ui/RaceCard'; import { Car, Trophy, Zap, ArrowRight } from 'lucide-react'; import React from 'react'; import { LucideIcon } from 'lucide-react'; interface RaceListItemProps { track: string; car: string; timeLabel?: string; relativeTimeLabel?: string; dateLabel?: string; dayLabel?: string; status: string; leagueName?: string | null; leagueHref?: string; strengthOfField?: number | null; onClick: () => void; statusConfig: { icon: LucideIcon; variant: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'; label: string; }; } export function RaceListItem({ track, car, timeLabel, relativeTimeLabel, dateLabel, dayLabel, status, leagueName, leagueHref, strengthOfField, onClick, statusConfig, }: RaceListItemProps) { const isLive = status === 'running'; return (
{statusConfig.label} } meta={
{strengthOfField && (
SOF {strengthOfField}
)} {leagueName && leagueHref && ( e.stopPropagation()} variant="primary" >
{leagueName}
)}
} /> ); }