Refactor: Reorganize state management into atoms and selectors directories
Moved all Recoil atoms to a new 'atoms' directory and selectors to a 'selectors' directory to clarify the project structure and improve maintainability. This change separates concerns by clearly distinguishing between simple state (atoms) and derived state (selectors), facilitating better understanding and scalability of the application's state management.
This commit is contained in:
7
store/atoms/gisStationState.js
Normal file
7
store/atoms/gisStationState.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
store/atoms/gisSystemState.js
Normal file
7
store/atoms/gisSystemState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// Pfad: store/atoms/gisStationState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const gisSystemStaticState = atom({
|
||||
key: "gisSystemStatic", // Eindeutiger Schlüssel (innerhalb des Projekts)
|
||||
default: [], // Standardwert (Anfangszustand)
|
||||
});
|
||||
24
store/atoms/mapLayersState.js
Normal file
24
store/atoms/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,
|
||||
"SMS-Funkmodem": true,
|
||||
Sonstige: true,
|
||||
},
|
||||
});
|
||||
7
store/atoms/poiTypState.js
Normal file
7
store/atoms/poiTypState.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// store/poiTypState.js
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const poiTypState = atom({
|
||||
key: "poiTypState", // eindeutiger Schlüssel
|
||||
default: [], // Initialer Standardwert, leeres Array
|
||||
});
|
||||
7
store/atoms/selectedAreaState.js
Normal file
7
store/atoms/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)
|
||||
});
|
||||
7
store/atoms/zoomTriggerState.js
Normal file
7
store/atoms/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.
|
||||
});
|
||||
Reference in New Issue
Block a user