From 8f672ce193b700732b444966be89608fd6207fc9 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Thu, 17 Aug 2023 14:11:11 +0300 Subject: [PATCH] fix: use departure time instead of arrival time in stops near you view --- app/component/StopNearYouContainer.js | 4 ++-- app/component/StopNearYouDepartureRowContainer.js | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/component/StopNearYouContainer.js b/app/component/StopNearYouContainer.js index 72c27131e0..8c80ede416 100644 --- a/app/component/StopNearYouContainer.js +++ b/app/component/StopNearYouContainer.js @@ -31,7 +31,7 @@ const containerComponent = createRefetchContainer( startTime: $startTime omitNonPickups: $omitNonPickups ) { - realtimeArrival + realtimeDeparture realtime realtimeState serviceDay @@ -85,7 +85,7 @@ const containerComponent = createRefetchContainer( stop { platformCode } - realtimeArrival + realtimeDeparture realtime serviceDay headsign diff --git a/app/component/StopNearYouDepartureRowContainer.js b/app/component/StopNearYouDepartureRowContainer.js index b975d758f9..05d3fe7939 100644 --- a/app/component/StopNearYouDepartureRowContainer.js +++ b/app/component/StopNearYouDepartureRowContainer.js @@ -9,10 +9,12 @@ const StopNearYouDepartureRowContainer = ({ stopTimes, mode, ...props }) => { .slice() .sort( (a, b) => - a.serviceDay + a.realtimeArrival - (b.serviceDay + b.realtimeArrival), + a.serviceDay + + a.realtimeDeparture - + (b.serviceDay + b.realtimeDeparture), ); const departures = sortedStopTimes.map(row => { - const departureTime = row.serviceDay + row.realtimeArrival; + const departureTime = row.serviceDay + row.realtimeDeparture; return (