fix: Kabelstrecken werden ausgeblendet

This commit is contained in:
ISA
2025-08-22 09:46:31 +02:00
parent bf7b62d110
commit f2a322a91b
8 changed files with 82 additions and 36 deletions

View File

@@ -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
);
},
},
});