aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-22 19:24:51 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-11-22 19:24:51 +0100
commitb6f8822c4f05602a7f7b7a96288829722b3988fc (patch)
tree17566d147c318a97c99693b5aeb6d95b9bdb55f8 /src/frontend/app
parentde6f38f26cfb7c311fc9e4fb051191df12b8b042 (diff)
Try to debug why in prod, clicking the map doesn't work
Diffstat (limited to 'src/frontend/app')
-rw-r--r--src/frontend/app/routes/home.tsx1
-rw-r--r--src/frontend/app/routes/map.tsx10
2 files changed, 8 insertions, 3 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);
});