From 016df4c9d6863ea00a613cb75ba0cea0674e2ffd Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Mon, 18 Aug 2025 10:36:21 +0200 Subject: [PATCH] Fix jwt-token --- client/src/pages/MapView.jsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/client/src/pages/MapView.jsx b/client/src/pages/MapView.jsx index 0506826..3c616a8 100644 --- a/client/src/pages/MapView.jsx +++ b/client/src/pages/MapView.jsx @@ -422,8 +422,11 @@ const MapView = () => { dashArray: dashPattern }} eventHandlers={{ - click: () => { + click: (e) => { + e.originalEvent.preventDefault(); + e.originalEvent.stopPropagation(); console.log('MapView: Ring clicked for drone:', detection); + setSelectedDetection(detection); } }} > @@ -719,13 +722,19 @@ const DroneDetectionPopup = ({ detection, age, droneTypes, droneDetectionHistory
First detected: - {format(new Date(firstDetection.device_timestamp), 'MMM dd, HH:mm:ss')} + {firstDetection.device_timestamp ? + format(new Date(firstDetection.device_timestamp), 'MMM dd, HH:mm:ss') : + 'Unknown' + }
Latest detection: - {format(new Date(detection.device_timestamp), 'MMM dd, HH:mm:ss')} + {detection.device_timestamp ? + format(new Date(detection.device_timestamp), 'MMM dd, HH:mm:ss') : + 'Unknown' + }
{droneHistory.length > 1 && (