department-of-veterans-affairs/vets-website

View on GitHub
src/applications/check-in/reducers/pre-check-in/index.js

Summary

Maintainability
A
1 hr
Test Coverage
const recordAnswerHandler = (state, action) => {
  const data = { ...state.form.data, ...action.payload };
  return {
    ...state,
    form: { ...state.form, data },
  };
};

const setVeteranDataHandler = (state, action) => {
  return {
    ...state,
    appointments: action.payload.appointments,
    veteranData: { demographics: action.payload.demographics },
  };
};

export { recordAnswerHandler, setVeteranDataHandler };