department-of-veterans-affairs/vets-website

View on GitHub
src/applications/gi/reducers/error.js

Summary

Maintainability
A
50 mins
Test Coverage
import { SET_ERROR } from '../actions';

const initialState = {
  error: null,
};
const errorReducer = (state = initialState, action) => {
  if (action.type === SET_ERROR) {
    return {
      ...state,
      error: action.payload,
    };
  }
  return state;
};
export default errorReducer;