'use client';
import { routes } from '@/lib/routing/RouteConfig';
import { Icon } from '@/ui/Icon';
import { Link } from '@/ui/Link';
import { Stack } from '@/ui/Stack';
import { Surface } from '@/ui/Surface';
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/ui/Table';
import { Text } from '@/ui/Text';
import { Calendar, ChevronRight, MapPin } from 'lucide-react';
interface RaceEntry {
id: string;
name: string;
track: string;
scheduledAt: string;
status: 'upcoming' | 'live' | 'completed';
}
interface ScheduleTableProps {
races: RaceEntry[];
}
export function ScheduleTable({ races }: ScheduleTableProps) {
return (
Race
Track
Date
Status
Actions
{races.length === 0 ? (
No races scheduled yet.
) : (
races.map((race) => (
{race.name}
{race.track}
{new Date(race.scheduledAt).toLocaleDateString()}
DETAILS
))
)}
);
}
function StatusBadge({ status }: { status: RaceEntry['status'] }) {
const styles = {
upcoming: 'bg-gray-500/10 text-gray-500 border-gray-500/20',
live: 'bg-performance-green/10 text-performance-green border-performance-green/20 animate-pulse',
completed: 'bg-primary-blue/10 text-primary-blue border-primary-blue/20',
};
return (
{status.toUpperCase()}
);
}