department-of-veterans-affairs/vets-website

View on GitHub
src/applications/mhv-medical-records/actions/alerts.js

Summary

Maintainability
A
1 hr
Test Coverage
import { Actions } from '../util/actionTypes';

export const addAlert = (type, error) => async dispatch => {
  dispatch({
    type: Actions.Alerts.ADD_ALERT,
    payload: {
      type,
      error,
    },
  });
};

export const clearAlerts = () => async dispatch => {
  dispatch({
    type: Actions.Alerts.CLEAR_ALERT,
  });
};