feat: Persist checkbox states in localStorage to retain settings after page reload

- Implemented logic to save the visibility states of POI and map layers in localStorage.
- Loaded saved checkbox states on component mount to retain user preferences.
- Updated `handleCheckboxChange` and `handlePoiCheckboxChange` to store changes in localStorage.
- Ensured that settings persist across page reloads for a better user experience.
This commit is contained in:
ISA
2024-09-11 09:38:51 +02:00
parent f5e9de16f6
commit f16d389dfd
3 changed files with 38 additions and 11 deletions

View File

@@ -16,6 +16,8 @@ const useLineData = (webserviceGisLinesStatusUrl, setLineStatusData) => {
ws.onopen = () => {
console.log("WebSocket-Verbindung hergestellt");
// Testnachricht an den Server senden
ws.send(JSON.stringify({ type: "test", message: "Hallo vom Client" }));
};
ws.onmessage = (event) => {