{"size": 605, "ext": "js", "max_stars_repo_path": "src-client-react/modules/orders/orders-reducers.js", "max_stars_repo_name": "nguyenkimbang/erick_skill_server", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src-client-react/modules/orders/orders-reducers.js", "max_issues_repo_name": "nguyenkimbang/erick_skill_server", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src-client-react/modules/orders/orders-reducers.js", "max_forks_repo_name": "nguyenkimbang/erick_skill_server", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.6071428571, "max_line_length": 50, "alphanum_fraction": 0.7256198347}
import { fromJS } from "immutable";

import { reducer } from './actions'

export const initState = {
  isOrderDetailFetched: false,
  orderDetail: null,
  isUserOrderListFetched: false,
  userOrders: [],
  cartItemCounter: 0,
  showLoadingIndicator: false, 
  //should declare by models bussiness
  searchMoreProductViewModel: {
    searchText: '',
    productsResult: []
  }
}

function orderReducer(state = initState, action) {
  const immuableState = fromJS(state);
  const newState = immuableState.toJS();
  reducer(newState, action, immuableState);

  return newState;
}

export default orderReducer
