moved user joblist into it's own slice, to avoid unneccessary side menu display recalculation

This commit was merged in pull request #121.
This commit is contained in:
victorAnumudu
2023-05-30 07:29:57 +01:00
parent 577212eb19
commit b2bfa6cd54
7 changed files with 89 additions and 46 deletions
+20
View File
@@ -0,0 +1,20 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
userJobList: {loading: true, data: []}
};
export const userSlice = createSlice({
name: "userJobList",
initialState,
reducers: {
updateUserJobList: (state,action) => {
state.userJobList = {...action.payload}
},
},
});
// Action creators are generated for each case reducer function
export const { updateUserJobList } = userSlice.actions;
export default userSlice.reducer;