fix: POI hinzufügen funktioniert! addStationCallback und Benutzerrechte in server URL:
This commit is contained in:
@@ -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------------
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// /utils/utils.js
|
||||
import { useState } from "react";
|
||||
import circleIcon from "../components/CircleIcon";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user