From 4a2d2fe4a08436ab6d2374c1b0e6b8aa277007ec Mon Sep 17 00:00:00 2001 From: Holger Bruch Date: Mon, 3 Feb 2025 15:31:10 +0100 Subject: [PATCH] feat: show only city for carpool origin/dest --- app/component/Itinerary.Carpool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/component/Itinerary.Carpool.js b/app/component/Itinerary.Carpool.js index 5355321dee..98414c56cd 100644 --- a/app/component/Itinerary.Carpool.js +++ b/app/component/Itinerary.Carpool.js @@ -37,12 +37,12 @@ const Itinerary = ( } const firstDepartureLeg = data.legs.find(isTransitLeg); const { stoptimes } = firstDepartureLeg.trip; - const origin = stoptimes[0].stop.name; + const origin = stoptimes[0].stop.name.split(',')[0]; const boarding = firstDepartureLeg.from.name; const alighting = firstDepartureLeg.to.name; const agencyName = firstDepartureLeg.route.agency.name; const routeUrl = firstDepartureLeg.route.url; - const destination = stoptimes[stoptimes.length - 1].stop.name; + const destination = stoptimes[stoptimes.length - 1].stop.name.split(',')[0]; const ariaLabelMessage = intl.formatMessage( {