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:
@@ -35,10 +35,10 @@ const ChartSwitcher: React.FC<ChartSwitcherProps> = ({
|
||||
|
||||
// **Redux-States für aktive Messkurve (TDR oder Schleife)**
|
||||
const activeMode = useSelector(
|
||||
(state: RootState) => state.kueChartMode.activeMode
|
||||
(state: RootState) => state.kueChartModeSlice.activeMode
|
||||
);
|
||||
const isFullScreen = useSelector(
|
||||
(state: RootState) => state.kabelueberwachungChart.isFullScreen
|
||||
(state: RootState) => state.kabelueberwachungChartSlice.isFullScreen
|
||||
);
|
||||
|
||||
// **Modal schließen + Redux-Status zurücksetzen**
|
||||
@@ -60,7 +60,7 @@ const ChartSwitcher: React.FC<ChartSwitcherProps> = ({
|
||||
dispatch(setSelectedChartType(chartType));
|
||||
};
|
||||
//-------------------------------------
|
||||
|
||||
/*
|
||||
useEffect(() => {
|
||||
//dispatch(fetchAllTDRChartData()); // Erstes Laden
|
||||
|
||||
@@ -70,7 +70,7 @@ const ChartSwitcher: React.FC<ChartSwitcherProps> = ({
|
||||
|
||||
return () => clearInterval(interval); // Cleanup, wenn Komponente entladen wird
|
||||
}, [dispatch]);
|
||||
|
||||
*/
|
||||
//-------------------------------------
|
||||
return (
|
||||
<ReactModal
|
||||
|
||||
Reference in New Issue
Block a user