const intialState = {
  uploadImageInfo: {
    uploadImageCount: 0,
  },
};

const clearState = {
  uploadImageInfo: {
    uploadImageCount: 0,
  },
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "UPLOAD_IMAGE":
      return { ...state, uploadImageInfo: action.payload };
    case "CLEAR_UPLOAD_IMAGE_REDUX":
      return clearState;
    default:
      return state;
  }
};
