initial docker setup
This commit is contained in:
40
frontend/src/reducers/coMarket/coMarketPackagesReducers.js
Normal file
40
frontend/src/reducers/coMarket/coMarketPackagesReducers.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import {
|
||||
RECIEVE_SHOP_PACKAGES,
|
||||
RECIEVE_SHOP_COMMERCIAL_LEADS,
|
||||
SELECT_SHOP_COMMERCIAL_LEAD,
|
||||
REQUEST_SHOP_PACKAGES
|
||||
} from '../../constants/coMarketConstants';
|
||||
|
||||
const moduleReducers = {};
|
||||
|
||||
moduleReducers[REQUEST_SHOP_PACKAGES] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
isLoading: action.isLoading
|
||||
});
|
||||
};
|
||||
|
||||
moduleReducers[RECIEVE_SHOP_PACKAGES] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
shopPackages: action.shopPackages,
|
||||
isLoading: action.isLoading
|
||||
});
|
||||
};
|
||||
|
||||
moduleReducers[RECIEVE_SHOP_COMMERCIAL_LEADS] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
commercialLeads: action.commercialLeads
|
||||
});
|
||||
};
|
||||
|
||||
moduleReducers[SELECT_SHOP_COMMERCIAL_LEAD] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
selectedCommercialLead: action.selectedCommercialLead
|
||||
});
|
||||
};
|
||||
|
||||
const coMarketPackagesReducer = (state = {}, action) => {
|
||||
|
||||
return moduleReducers[action.type] ? moduleReducers[action.type](state, action) : state;
|
||||
};
|
||||
|
||||
export default coMarketPackagesReducer;
|
||||
Reference in New Issue
Block a user