Files copy and paste from store atoms and selector to redux slices folder
This commit is contained in:
7
redux/slices/currentPoiState.js
Normal file
7
redux/slices/currentPoiState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// store/atoms/currentPoiState.js
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const currentPoiState = atom({
|
||||
key: 'currentPoiState', // Eindeutiger Key, der dieses Atom identifiziert
|
||||
default: null, // Standardwert ist null oder ein leeres Objekt, je nach Bedarf
|
||||
});
|
||||
7
redux/slices/gisStationsStaticDistrictSlice.js
Normal file
7
redux/slices/gisStationsStaticDistrictSlice.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// Pfad: store/atoms/gisStationState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const gisStationsStaticDistrictState = atom({
|
||||
key: "gisStationsStaticDistrict", // Eindeutiger Schlüssel (innerhalb des Projekts)
|
||||
default: [], // Standardwert (Anfangszustand)
|
||||
});
|
||||
7
redux/slices/gisSystemStaticSlice.js
Normal file
7
redux/slices/gisSystemStaticSlice.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// Pfad: store/atoms/gisSystemtate.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const gisSystemStaticState = atom({
|
||||
key: "gisSystemStatic", // Eindeutiger Schlüssel (innerhalb des Projekts)
|
||||
default: [], // Standardwert (Anfangszustand)
|
||||
});
|
||||
24
redux/slices/mapLayersState.js
Normal file
24
redux/slices/mapLayersState.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// store/mapLayersState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const mapLayersState = atom({
|
||||
key: "mapLayersState", // Eindeutiger Schlüssel für das Atom
|
||||
default: {
|
||||
// Standardwerte für jeden Layer
|
||||
TALAS: true,
|
||||
ECI: true,
|
||||
ULAF: true,
|
||||
GSMModem: true,
|
||||
CiscoRouter: true,
|
||||
WAGO: true,
|
||||
Siemens: true,
|
||||
OTDR: true,
|
||||
WDM: true,
|
||||
GMA: true,
|
||||
Messstellen: true,
|
||||
TALASICL: true,
|
||||
DAUZ: true,
|
||||
SMSFunkmodem: true,
|
||||
Sonstige: true,
|
||||
},
|
||||
});
|
||||
9
redux/slices/poiLayerVisible.js
Normal file
9
redux/slices/poiLayerVisible.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// /store/atoms/poiLayerVisible.js
|
||||
// Recoil atom for the visibility of the POI layer
|
||||
//
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const poiLayerVisibleState = atom({
|
||||
key: "poiLayerVisibleState",
|
||||
default: true,
|
||||
});
|
||||
8
redux/slices/poiLayerVisibleState.js
Normal file
8
redux/slices/poiLayerVisibleState.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// /store/atoms/poiLayerVisibleState.js
|
||||
// Recoil atom for the visibility of the POI layer
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const poiLayerVisibleState = atom({
|
||||
key: "poiLayerVisibleState",
|
||||
default: true,
|
||||
});
|
||||
7
redux/slices/poiReadFromDbTriggerSlice.js
Normal file
7
redux/slices/poiReadFromDbTriggerSlice.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// store/atoms/poiReadFromDbTriggerAtom.js
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const poiReadFromDbTriggerAtom = atom({
|
||||
key: 'poiReadFromDbTriggerAtom',
|
||||
default: 0, // Sie können auch einen booleschen Wert verwenden
|
||||
});
|
||||
7
redux/slices/polylineEventsDisabledState.js
Normal file
7
redux/slices/polylineEventsDisabledState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// /store/atoms/polylineEventsDisabledState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const polylineEventsDisabledState = atom({
|
||||
key: "polylineEventsDisabledState",
|
||||
default: false,
|
||||
});
|
||||
7
redux/slices/polylineLayerVisibleState.js
Normal file
7
redux/slices/polylineLayerVisibleState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// /sttore/atoms/polylineLayerVisibleState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const polylineLayerVisibleState = atom({
|
||||
key: "polylineLayerVisibleState",
|
||||
default: true, // Standardmäßig auf sichtbar setzen
|
||||
});
|
||||
7
redux/slices/readPoiMarkersStore.js
Normal file
7
redux/slices/readPoiMarkersStore.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//store/selectors/readPoiMarkersStore.js
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const readPoiMarkersStore = atom({
|
||||
key: 'readPoiMarkersStore',
|
||||
default: [],
|
||||
});
|
||||
7
redux/slices/selectedAreaState.js
Normal file
7
redux/slices/selectedAreaState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// In deinem Recoil store
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const selectedAreaState = atom({
|
||||
key: "selectedAreaState", // unique ID (with respect to other atoms/selectors)
|
||||
default: null, // default value (aka initial value)
|
||||
});
|
||||
8
redux/slices/selectedPoiState.js
Normal file
8
redux/slices/selectedPoiState.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// store/atoms/poiState.js
|
||||
//Ist gedacht um ausgewählte Poi Informationen zu speichern und zu PoiUpdateModal.js zu übergeben
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const selectedPoiState = atom({
|
||||
key: "poiState", // Einzigartiger Key (mit der gesamten Anwendung)
|
||||
default: null, // Standardwert
|
||||
});
|
||||
13
redux/slices/urlParameterState.js
Normal file
13
redux/slices/urlParameterState.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { atom } from "recoil";
|
||||
|
||||
// Atom für die Speicherung der mapId aus der URL
|
||||
export const mapIdState = atom({
|
||||
key: "mapIdState", // Eindeutiger Schlüssel (innerhalb des gesamten Projekts)
|
||||
default: "10", // Standardwert
|
||||
});
|
||||
|
||||
// Atom für die Speicherung der userId aus der URL
|
||||
export const userIdState = atom({
|
||||
key: "userIdState",
|
||||
default: "484",
|
||||
});
|
||||
7
redux/slices/zoomTriggerState.js
Normal file
7
redux/slices/zoomTriggerState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// store/zoomTriggerState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const zoomTriggerState = atom({
|
||||
key: "zoomTriggerState",
|
||||
default: 0, // Dies kann eine einfache Zählvariable sein, die inkrementiert wird.
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/store.js
|
||||
import { configureStore } from "@reduxjs/toolkit";
|
||||
import websocketMiddleware from "./websocketMiddleware";
|
||||
import websocketMiddleware from "./middleware/websocketMiddleware";
|
||||
import websocketReducer from "./reducer";
|
||||
|
||||
// Erstelle den Store mit configureStore
|
||||
|
||||
Reference in New Issue
Block a user