feat(redux): Rename all Redux slices and store keys to match file names for clarity
- Renamed all slice names (createSlice `name` attribute) to match their file names (e.g. loopChartSlice, authSlice, kueDataSlice etc.) - Updated `store.ts` to register each reducer with consistent key names (e.g. state.loopChartSlice instead of state.loopChart) - Adjusted all `useSelector` and Redux state accesses across the codebase - Improves maintainability, searchability and consistency across files and Redux DevTools
This commit is contained in:
@@ -25,14 +25,14 @@ function Kabelueberwachung() {
|
||||
kueResidence,
|
||||
kueCableBreak,
|
||||
kueGroundFault,
|
||||
} = useSelector((state) => state.kueData);
|
||||
} = useSelector((state) => state.kueDataSlice);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
// 🚀 **TDR-Daten bereits in Redux abrufen**
|
||||
// Redux-Variablen abrufen
|
||||
const tdrData = useSelector((state) => state.tdrChart.data);
|
||||
const loading = useSelector((state) => state.tdrChart.loading);
|
||||
const error = useSelector((state) => state.tdrChart.error);
|
||||
const tdrData = useSelector((state) => state.tdrChartSlice.data);
|
||||
const loading = useSelector((state) => state.tdrChartSlice.loading);
|
||||
const error = useSelector((state) => state.tdrChartSlice.error);
|
||||
//----------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------
|
||||
@@ -110,7 +110,7 @@ function Kabelueberwachung() {
|
||||
data: loopData,
|
||||
loading: loopLoading,
|
||||
error: loopError,
|
||||
} = useSelector((state: RootState) => state.loopChart);
|
||||
} = useSelector((state: RootState) => state.loopChartSlice);
|
||||
|
||||
// Zugriff z. B. auf Schleifenwiderstand von DIA1
|
||||
const dia1Schleifen = loopData["DIA1"]?.[4];
|
||||
|
||||
Reference in New Issue
Block a user