commonProblem.js 509 Bytes
import * as types from '../constants/ActionTypes';

const initialState = {
  problemsList: {},
  problemsDetails: {},
};

export default function commonProblem(state = initialState, action) {
  switch (action.type) {
    case types.PROBLENS_LIST:
      return Object.assign({}, state, {
        problemsList: action.problemsList
      });
    case types.PROBLEMS_DETAILS:
      return Object.assign({}, state, {
        problemsDetails: action.problemsDetails
      });
    default:
      return state;
  }
}