From b2ddc0ef449ccbe7f0d33e539ccdfc1baef04e2c Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Sun, 28 Dec 2025 18:21:17 +0100
Subject: Get favourite stops from OTP instead of pre-generated file

---
 src/frontend/app/components/PlannerOverlay.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/frontend/app/components/PlannerOverlay.tsx')

diff --git a/src/frontend/app/components/PlannerOverlay.tsx b/src/frontend/app/components/PlannerOverlay.tsx
index 55e52d7..0320d45 100644
--- a/src/frontend/app/components/PlannerOverlay.tsx
+++ b/src/frontend/app/components/PlannerOverlay.tsx
@@ -110,10 +110,11 @@ export const PlannerOverlay: React.FC<PlannerOverlayProps> = ({
 
   useEffect(() => {
     // Load favourites once; used as local suggestions in the picker.
-    StopDataProvider.getStops()
-      .then((stops) =>
-        stops
-          .filter((s) => s.favourite && s.latitude && s.longitude)
+    const favouriteIds = StopDataProvider.getFavouriteIds();
+    StopDataProvider.fetchStopsByIds(favouriteIds)
+      .then((stopsMap) =>
+        Object.values(stopsMap)
+          .filter((s) => s.latitude && s.longitude)
           .map(
             (s) =>
               ({
-- 
cgit v1.3

