From 5f8c2ef5f81fa1c1fdbe582872dc9df98ae46fa4 Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Wed, 10 Sep 2025 13:25:39 +0200 Subject: [PATCH] Fix jwt-token --- client/src/pages/MapView.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/pages/MapView.jsx b/client/src/pages/MapView.jsx index 6752a95..fd0183f 100644 --- a/client/src/pages/MapView.jsx +++ b/client/src/pages/MapView.jsx @@ -419,6 +419,10 @@ const MapView = () => { return detections.map((detection, droneIndex) => { console.log('MapView: Rendering ring for detection:', detection, 'droneIndex:', droneIndex, 'totalDrones:', detections.length, 'detector device:', detectorDevice); + + // Calculate values first + const totalDrones = detections.length; + const opacity = getDetectionOpacity(detection); const age = getDetectionAge(detection); console.log('MapView: Detection age:', age, 'opacity:', opacity); @@ -493,7 +497,6 @@ const MapView = () => { ]; }; - const totalDrones = detections.length; const dashPattern = getDashPattern(detection.drone_type, droneIndex, totalDrones); const [latOffset, lonOffset] = getPositionOffset(droneIndex, totalDrones);