diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-02 01:08:41 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-02 01:08:41 +0100 |
| commit | a3eb2d0441ae18f75604a4bee64db18391469837 (patch) | |
| tree | 8994c1987afdd9436ba0699236439d3eb6c3f04d /src/frontend/app/routes | |
| parent | dd544d713a2af4713c61ae0d2050f2861cc0892a (diff) | |
feat: Integrate Geoapify geocoding service and update configuration
Diffstat (limited to 'src/frontend/app/routes')
| -rw-r--r-- | src/frontend/app/routes/planner.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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 = |
