fix: Kabelstrecken werden ausgeblendet
This commit is contained in:
@@ -44,6 +44,14 @@ const polylineLayerVisibleSlice = createSlice({
|
||||
if (mapId && userId) {
|
||||
const key = `polylineVisible_m${mapId}_u${userId}`;
|
||||
localStorage.setItem(key, action.payload.toString());
|
||||
console.log(
|
||||
"[Redux/setPolylineVisible] payload:",
|
||||
action.payload,
|
||||
"key:",
|
||||
key,
|
||||
"localStorage:",
|
||||
localStorage.getItem(key)
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
// fallback: do nothing
|
||||
@@ -54,7 +62,12 @@ const polylineLayerVisibleSlice = createSlice({
|
||||
// Diese Action wird nur beim Initialisieren aus localStorage verwendet
|
||||
state.visible = action.payload;
|
||||
state.isInitialized = true;
|
||||
console.log("🔧 Redux: initializePolylineFromLocalStorage called with:", action.payload);
|
||||
console.log(
|
||||
"🔧 Redux: initializePolylineFromLocalStorage called with:",
|
||||
action.payload,
|
||||
"visible:",
|
||||
state.visible
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user