'use client' import Image from 'next/image' interface TrainLineProps { routeId: string arrivalTimes: number[] } const TrainLine = ({ routeId, arrivalTimes }: TrainLineProps) => { const formatTimes = (times: number[]): string => { if (!times || times.length === 0) { return 'No trains' } return times .sort((a, b) => a - b) .join(', ') } const getLineImage = (route: string): string => { const cleanRoute = route.replace('Route.', '') return `/images/lines/${cleanRoute}.svg` } return (