From 8285720da117983b2849c0f6393331e305a876cd Mon Sep 17 00:00:00 2001 From: Jono Cooper Date: Tue, 5 Jan 2021 11:09:38 +1300 Subject: [PATCH] Fix clicking on trip on multi stops --- js/views/station/InactiveTrips.jsx | 10 +++++++++- js/views/station/Station.jsx | 8 +++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/js/views/station/InactiveTrips.jsx b/js/views/station/InactiveTrips.jsx index 5b336b7d..6253a2ea 100644 --- a/js/views/station/InactiveTrips.jsx +++ b/js/views/station/InactiveTrips.jsx @@ -63,6 +63,7 @@ export const InactiveTrips = ({ routes, onClick, region }) => { direction_id: directionId, route_color: routeColor, route_text_color: routeTextColor, + stop_id: stopId, } = route return ( { }, ]} onClick={() => - onClick(agencyId, routeId, routeShortName, directionId) + onClick( + agencyId, + routeId, + routeShortName, + directionId, + null, + stopId + ) } /> ) diff --git a/js/views/station/Station.jsx b/js/views/station/Station.jsx index 43a6ba68..76715b29 100644 --- a/js/views/station/Station.jsx +++ b/js/views/station/Station.jsx @@ -191,11 +191,11 @@ class Station extends Component { routeId, routeShortName, directionId, - tripId = null + tripId = null, + stopId ) => { const { history, match } = this.props const url = ['/l', match.params.region, agencyId, routeShortName].join('/') - const stopId = match.params.station let tripIdParameter = '' if (tripId != null) { tripIdParameter = `&trip_id=${tripId}` @@ -273,6 +273,7 @@ class Station extends Component { route_id: routeId, route_text_color: routeTextColor, route_icon: routeIcon, + stop_id: stopId, } = item[0] return (