fix: POI hinzufügen funktioniert! addStationCallback und Benutzerrechte in server URL:

This commit is contained in:
ISA
2024-07-16 07:25:49 +02:00
parent d1e37a45c0
commit 5bf16940fd
2 changed files with 6 additions and 2 deletions

View File

@@ -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------------

View File

@@ -1,3 +1,4 @@
// /utils/utils.js
import { useState } from "react";
import circleIcon from "../components/CircleIcon";