%PDF- %PDF-
Direktori : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/js/reducers/ |
Current File : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/js/reducers/productPackageInfo.js |
import { fromJS } from "immutable"; import LIST_ACTIONS from "../constants/action_types"; const initialState = fromJS({ productPackagesInfo: [], loading: false, }); const cars = (state = initialState, action = {}) => { switch (action.type) { case LIST_ACTIONS.GET_PRODUCT_PACKAGE_INFO_REQUEST: return state.set("loading", true); case LIST_ACTIONS.GET_PRODUCT_PACKAGE_INFO_SUCCESS: return state .set("productPackagesInfo", action.payload) .set("loading", false); case LIST_ACTIONS.GET_PRODUCT_PACKAGE_INFO__ERROR: return state.set("loading", false); default: return state; } }; export default cars;