"use client"; import { Protest } from "@gridpilot/racing/domain/entities/Protest"; import { Race } from "@gridpilot/racing/domain/entities/Race"; import { DriverDTO } from "@gridpilot/racing/application/dto/DriverDTO"; import Card from "../ui/Card"; import Button from "../ui/Button"; import Link from "next/link"; import { AlertCircle, Video, ChevronRight, Flag, Clock, AlertTriangle } from "lucide-react"; interface PendingProtestsListProps { protests: Protest[]; races: Record; drivers: Record; leagueId: string; onReviewProtest: (protest: Protest) => void; onProtestReviewed: () => void; } export function PendingProtestsList({ protests, races, drivers, leagueId, onReviewProtest, onProtestReviewed, }: PendingProtestsListProps) { if (protests.length === 0) { return (

All Clear! 🏁

No pending protests to review

); } return (
{protests.map((protest) => { const daysSinceFiled = Math.floor((Date.now() - new Date(protest.filedAt).getTime()) / (1000 * 60 * 60 * 24)); const isUrgent = daysSinceFiled > 2; return (

Protest #{protest.id.substring(0, 8)}

Filed {new Date(protest.filedAt).toLocaleDateString()}

Pending {isUrgent && ( {daysSinceFiled}d old )}
Lap {protest.incident.lap}

{protest.incident.description}

{protest.proofVideoUrl && (
)}
); })}
); }