'use client' import TrainLine from './TrainLine' interface Route { routeId: string arrival_times: number[] } interface DirectionCardProps { direction: 'North' | 'South' routes: Route[] } const DirectionCard = ({ direction, routes }: DirectionCardProps) => { return (

{direction}

{routes && routes.length > 0 ? ( routes.map((route, index) => ( )) ) : (
No trains available
)}
) } export default DirectionCard