"use client"; import { Card } from "@/components/ui/card"; import { cn } from "@/lib/utils"; interface Run { id: number; start: string; end: string; hops: number; } interface RunsListProps { runs: Run[]; onSelectRun: (runId: number) => void; selectedRunId: number | null; } export default function RunsList({ runs, onSelectRun, selectedRunId, }: RunsListProps) { return (
{runs.map((run) => ( onSelectRun(run.id)} >

{run.start} {run.end}

{run.hops} hops

{selectedRunId === run.id && ( ))} {runs.length === 0 && (
No runs available
)}
); }