feat: add missing backend route and frontend utility/config files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
3
apps/Frontend/src/redux/hooks.js
Normal file
3
apps/Frontend/src/redux/hooks.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
export const useAppDispatch = useDispatch;
|
||||
export const useAppSelector = useSelector;
|
||||
23
apps/Frontend/src/redux/slices/seleniumTaskSlice.js
Normal file
23
apps/Frontend/src/redux/slices/seleniumTaskSlice.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
const emptyTask = { status: "idle", message: "", show: false };
|
||||
const initialState = {
|
||||
claimSubmit: { ...emptyTask },
|
||||
eligibilityCheck: { ...emptyTask },
|
||||
eligibilityBatchCheck: { ...emptyTask },
|
||||
claimBatchCheck: { ...emptyTask },
|
||||
};
|
||||
const seleniumTaskSlice = createSlice({
|
||||
name: "seleniumTasks",
|
||||
initialState,
|
||||
reducers: {
|
||||
setTaskStatus: (state, action) => {
|
||||
const { key, ...partial } = action.payload;
|
||||
state[key] = { ...state[key], ...partial, show: true };
|
||||
},
|
||||
clearTaskStatus: (state, action) => {
|
||||
state[action.payload] = { ...emptyTask };
|
||||
},
|
||||
},
|
||||
});
|
||||
export const { setTaskStatus, clearTaskStatus } = seleniumTaskSlice.actions;
|
||||
export default seleniumTaskSlice.reducer;
|
||||
7
apps/Frontend/src/redux/store.js
Normal file
7
apps/Frontend/src/redux/store.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { configureStore } from "@reduxjs/toolkit";
|
||||
import seleniumTasksReducer from "./slices/seleniumTaskSlice";
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
seleniumTasks: seleniumTasksReducer,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user