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:
ISA
2025-04-01 12:26:41 +02:00
parent 948bc0d5ea
commit 20e20dec30
41 changed files with 288 additions and 319 deletions

View File

@@ -13,18 +13,18 @@ const TDRChartActionBar: React.FC = () => {
// ✅ Redux: selectedSlot aus kueChartMode (0-basiert)
const selectedSlot = useSelector(
(state: RootState) => state.kueChartMode.selectedSlot
(state: RootState) => state.kueChartModeSlice.selectedSlot
);
const tdmChartData = useSelector(
(state: RootState) => state.tdmSingleChart.data
(state: RootState) => state.tdmSingleChartSlice.data
);
const idsForSlot =
selectedSlot !== null ? tdmChartData[selectedSlot] ?? [] : [];
const tdrDataById = useSelector(
(state: RootState) => state.tdrDataById.dataById
(state: RootState) => state.tdrDataByIdSlice.dataById
);
const [selectedId, setSelectedId] = useState<number | null>(null);
const currentChartData = selectedId !== null ? tdrDataById[selectedId] : [];