const intialState = {
  retryCountInfo: {
    retryCount: 0,
    index: 0,
    isAddNewImageData: false,
  },
};

const clearState = {
  retryCountInfo: {
    retryCount: 0,
    index: 0,
    isAddNewImageData: false,
  },
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "RETRY_COUNT":
      return { ...state, retryCountInfo: action.payload };
    case "CLEAR_RETRY_COUNT_REDUX":
      return clearState;
    default:
      return state;
  }
};
