const intialState = {
  isLastInfo: {
    isLast: false,
  },
};

const clearState = {
  isLastInfo: {
    isLast: false,
  },
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "LAST_DATA":
      return { ...state, isLastInfo: action.payload };
    case "CLEAR_LAST_DATA_REDUX":
      return clearState;
    default:
      return state;
  }
};
