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:
@@ -37,7 +37,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
`Rendering Kue705FO - SlotIndex: ${slotIndex}, ModulName: ${modulName}`
|
||||
); */
|
||||
const selectedChartData = useSelector(
|
||||
(state: RootState) => state.selectedChartData.selectedChartData
|
||||
(state: RootState) => state.selectedChartDataSlice.selectedChartData
|
||||
);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
@@ -77,7 +77,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
kueAlarm2: kueAlarm2Raw,
|
||||
kueOverflow: kueOverflowRaw,
|
||||
kuePSTmMinus96V, // <- richtig, weil so im State vorhanden
|
||||
} = useSelector((state: RootState) => state.kueData);
|
||||
} = useSelector((state: RootState) => state.kueDataSlice);
|
||||
|
||||
//---------------------------------------------
|
||||
const kueCableBreak = useMemo(
|
||||
@@ -140,7 +140,9 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
);
|
||||
//---------------------------------
|
||||
//---------------------------------
|
||||
const tdmChartData = useSelector((state: RootState) => state.tdmChart.data);
|
||||
const tdmChartData = useSelector(
|
||||
(state: RootState) => state.tdmChartSlice.data
|
||||
);
|
||||
const latestTdrDistanceMeters =
|
||||
Array.isArray(tdmChartData?.[slotIndex]) &&
|
||||
tdmChartData[slotIndex].length > 0 &&
|
||||
|
||||
Reference in New Issue
Block a user