%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emergentqj/actioncivile/pre-auth/def/static/js/reducers/
Upload File :
Create Path :
Current File : /home/emergentqj/actioncivile/pre-auth/def/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;

Zerion Mini Shell 1.0