From 5bf16940fd177c3e1346671869408627ac3daa44 Mon Sep 17 00:00:00 2001 From: ISA Date: Tue, 16 Jul 2024 07:25:49 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20POI=20hinzuf=C3=BCgen=20funktioniert!=20?= =?UTF-8?q?addStationCallback=20und=20Benutzerrechte=20in=20server=20URL:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MapComponent.js | 7 +++++-- utils/utils.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/MapComponent.js b/components/MapComponent.js index e74abc33a..283d6ffcc 100644 --- a/components/MapComponent.js +++ b/components/MapComponent.js @@ -281,7 +281,10 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { // Kontextmenü Callback für "POI hinzufügen" const addStationCallback = useCallback( (event) => { - //console.log("Benutzerrechte zum Zeitpunkt des Aufrufs:", hasRights); + console.log( + "Überprüfung der Berechtigung in addStationCallback: ", + hasRights + ); if (hasRights) { setPopupCoordinates(event.latlng); setShowPopup(true); @@ -299,7 +302,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { } }, [hasRights] - ); // Abhängigkeit zu hasRights hinzufügen + ); //-----Kontextmenu----ende------------ diff --git a/utils/utils.js b/utils/utils.js index 5f162fb0a..66153dbdd 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -1,3 +1,4 @@ +// /utils/utils.js import { useState } from "react"; import circleIcon from "../components/CircleIcon";