import { types } from "../actions/actionTypes";

const initialState = {
  cancelInfoData: {},
  cancelReasonInfoData: {},
  orderShippingData: {},
};

export const cancelReducer = (state = initialState, action) => {
  switch (action.type) {
    case types.GET_MY_INFO_ORDER_CANCEL_SEARCH:
      return {
        ...state,
        cancelInfoData: action.payload,
      };

    case types.GET_MY_INFO_ORDER_CANCEL_COLUMNS_SEARCH:
      return {
        ...state,
        cancelReasonInfoData: action.payload,
      };

    default:
      return state;
  }
};
