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:
@@ -23,7 +23,7 @@ function KueModal({
|
||||
onModulNameChange,
|
||||
}: KueModalProps): JSX.Element {
|
||||
const isAdminLoggedIn = useSelector(
|
||||
(state: any) => state.auth.isAdminLoggedIn
|
||||
(state: any) => state.authSlice.isAdminLoggedIn
|
||||
);
|
||||
const [isAdmin, setIsAdmin] = useState(false);
|
||||
const dispatch = useDispatch();
|
||||
@@ -61,7 +61,7 @@ function KueModal({
|
||||
kueLimit2Low,
|
||||
kueLimit2High,
|
||||
kueLoopInterval,
|
||||
} = useSelector((state: any) => state.kueData);
|
||||
} = useSelector((state: any) => state.kueDataSlice);
|
||||
|
||||
const handleSaveWrapper = () => {
|
||||
handleSave({
|
||||
|
||||
Reference in New Issue
Block a user