From 12ecc97b07093f3cac6567c70ff75d57b429c674 Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Tue, 21 Oct 2025 17:38:01 +0200
Subject: Implement new Santiago region (WIP)

---
 src/frontend/app/routes/map.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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

diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx
index 56a9c79..c3a1308 100644
--- a/src/frontend/app/routes/map.tsx
+++ b/src/frontend/app/routes/map.tsx
@@ -38,7 +38,7 @@ export default function StopMap() {
     name: string;
   } | null>(null);
   const [isSheetOpen, setIsSheetOpen] = useState(false);
-  const { mapState, updateMapState, theme } = useApp();
+  const { mapState, updateMapState, theme, region } = useApp();
   const mapRef = useRef<MapRef>(null);
   const [mapStyleKey, setMapStyleKey] = useState<string>("light");
 
@@ -56,7 +56,7 @@ export default function StopMap() {
   };
 
   useEffect(() => {
-    StopDataProvider.getStops().then((data) => {
+    StopDataProvider.getStops(region).then((data) => {
       const features: GeoJsonFeature<
         Point,
         { stopId: number; name: string; lines: string[] }
@@ -70,7 +70,7 @@ export default function StopMap() {
       }));
       setStops(features);
     });
-  }, []);
+  }, [region]);
 
   useEffect(() => {
     //const styleName = "carto";
@@ -115,7 +115,7 @@ export default function StopMap() {
   const handlePointClick = (feature: any) => {
     const props: any = feature.properties;
     // fetch full stop to get lines array
-    StopDataProvider.getStopById(props.stopId).then((stop) => {
+    StopDataProvider.getStopById(region, props.stopId).then((stop) => {
       if (!stop) return;
       setSelectedStop({
         stopId: stop.stopId,
-- 
cgit v1.3

