cache banner API using redux
This commit was merged in pull request #580.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
const initialState = {
|
||||
familyBannersList: {}
|
||||
};
|
||||
|
||||
export const familyBannersListSlice = createSlice({
|
||||
name: "familyBannersList",
|
||||
initialState,
|
||||
reducers: {
|
||||
familyBannersList: (state,action) => {
|
||||
state.familyBannersList = {...action.payload}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Action creators are generated for each case reducer function
|
||||
export const { familyBannersList } = familyBannersListSlice.actions;
|
||||
|
||||
export default familyBannersListSlice.reducer;
|
||||
@@ -8,6 +8,7 @@ const initialState = {
|
||||
couponTable: false,
|
||||
walletTable: false,
|
||||
uploadsTable: false,
|
||||
familyBannersListTable: false,
|
||||
};
|
||||
|
||||
export const tableReloadSlice = createSlice({
|
||||
@@ -37,6 +38,9 @@ export const tableReloadSlice = createSlice({
|
||||
case "UPLOADSTABLE":
|
||||
state.uploadsTable = !state.uploadsTable;
|
||||
return;
|
||||
case "FAMILYBANNERSLIST":
|
||||
state.familyBannersListTable = !state.familyBannersListTable;
|
||||
return;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
+3
-1
@@ -8,6 +8,7 @@ import jobReducer from "./jobLists";
|
||||
import notificationsReducer from "./notifications";
|
||||
import userJobListReducer from "./userJobList";
|
||||
import walletDetails from "./walletDetails";
|
||||
import familyBannerListReducer from "./FamilyBannerList"
|
||||
|
||||
export default configureStore({
|
||||
reducer: {
|
||||
@@ -18,6 +19,7 @@ export default configureStore({
|
||||
userJobList: userJobListReducer,
|
||||
commonHeadBanner: commonHeadBannerReducer,
|
||||
notifications: notificationsReducer,
|
||||
walletDetails: walletDetails
|
||||
walletDetails: walletDetails,
|
||||
familyBannersList: familyBannerListReducer
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user