From a3eb2d0441ae18f75604a4bee64db18391469837 Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Fri, 2 Jan 2026 01:08:41 +0100
Subject: feat: Integrate Geoapify geocoding service and update configuration

---
 src/frontend/app/routes/planner.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/frontend/app/routes/planner.tsx')

diff --git a/src/frontend/app/routes/planner.tsx b/src/frontend/app/routes/planner.tsx
index b71d211..32c37c0 100644
--- a/src/frontend/app/routes/planner.tsx
+++ b/src/frontend/app/routes/planner.tsx
@@ -312,14 +312,14 @@ const ItineraryDetail = ({
           const stopKey = leg.from.name || leg.from.stopId;
           if (!arrivalsByStop[stopKey]) {
             try {
+              //TODO: Allow multiple stops one request
               const resp = await fetch(
-                `${APP_CONSTANTS.consolidatedCirculationsEndpoint}?stopId=${encodeURIComponent(leg.from.stopCode || leg.from.stopId)}`,
+                `/api/stops/arrivals?id=${encodeURIComponent(leg.from.stopId)}`,
                 { headers: { Accept: "application/json" } }
               );
 
               if (resp.ok) {
-                const data: ConsolidatedCirculation[] = await resp.json();
-                arrivalsByStop[stopKey] = data;
+                arrivalsByStop[stopKey] = await resp.json() satisfies ConsolidatedCirculation[];
               }
             } catch (err) {
               console.warn(
@@ -574,8 +574,8 @@ const ItineraryDetail = ({
                             linesToShow.push(previousLine);
                           }
 
-                          return nextArrivals[leg.from.name || leg.from.stopId]
-                            .filter((circ) => linesToShow.includes(circ.line))
+                          return nextArrivals[leg.from.stopId]
+                            ?.filter((circ) => linesToShow.includes(circ.line))
                             .slice(0, 3)
                             .map((circ, idx) => {
                               const minutes =
-- 
cgit v1.3

