diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-22 19:24:51 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-22 19:24:51 +0100 |
| commit | b6f8822c4f05602a7f7b7a96288829722b3988fc (patch) | |
| tree | 17566d147c318a97c99693b5aeb6d95b9bdb55f8 /src | |
| parent | de6f38f26cfb7c311fc9e4fb051191df12b8b042 (diff) | |
Try to debug why in prod, clicking the map doesn't work
Diffstat (limited to 'src')
| -rw-r--r-- | src/frontend/app/routes/home.tsx | 1 | ||||
| -rw-r--r-- | src/frontend/app/routes/map.tsx | 10 | ||||
| -rw-r--r-- | src/frontend/public/pwa-worker.js | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/frontend/app/routes/home.tsx b/src/frontend/app/routes/home.tsx index ca6a20b..31a8e6a 100644 --- a/src/frontend/app/routes/home.tsx +++ b/src/frontend/app/routes/home.tsx @@ -1,4 +1,3 @@ -"use client"; import Fuse from "fuse.js"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx index a711a64..2af53d8 100644 --- a/src/frontend/app/routes/map.tsx +++ b/src/frontend/app/routes/map.tsx @@ -50,7 +50,10 @@ export default function StopMap() { // Handle click events on clusters and individual stops const onMapClick = (e: MapLayerMouseEvent) => { const features = e.features; - if (!features || features.length === 0) return; + if (!features || features.length === 0) { + console.debug("No features found on map click. Position:", e.lngLat, "Point:", e.point); + return; + } const feature = features[0]; const props: any = feature.properties; @@ -140,7 +143,10 @@ export default function StopMap() { const props: any = feature.properties; // fetch full stop to get lines array StopDataProvider.getStopById(region, props.stopId).then((stop) => { - if (!stop) return; + if (!stop) { + console.warn("Stop not found:", props.stopId); + return; + } setSelectedStop(stop); setIsSheetOpen(true); }); diff --git a/src/frontend/public/pwa-worker.js b/src/frontend/public/pwa-worker.js index 649a161..e9be319 100644 --- a/src/frontend/public/pwa-worker.js +++ b/src/frontend/public/pwa-worker.js @@ -1,4 +1,4 @@ -const CACHE_VERSION = "20251118a"; +const CACHE_VERSION = "20251122a"; const STATIC_CACHE_NAME = `static-cache-${CACHE_VERSION}`; const STATIC_CACHE_ASSETS = ["/favicon.ico", "/logo-256.png", "/logo-512.jpg"]; |
