MCPcopy
hub / github.com/bradtraversy/devconnector_2.0 / setAlert

Function setAlert

client/src/actions/alert.js:4–12  ·  view source on GitHub ↗
(msg, alertType, timeout = 5000)

Source from the content-addressed store, hash-verified

2import { SET_ALERT, REMOVE_ALERT } from './types';
3
4export const setAlert = (msg, alertType, timeout = 5000) => dispatch => {
5 const id = uuidv4();
6 dispatch({
7 type: SET_ALERT,
8 payload: { msg, alertType, id }
9 });
10
11 setTimeout(() => dispatch({ type: REMOVE_ALERT, payload: id }), timeout);
12};

Callers 13

createProfileFunction · 0.90
addExperienceFunction · 0.90
addEducationFunction · 0.90
deleteExperienceFunction · 0.90
deleteEducationFunction · 0.90
deleteAccountFunction · 0.90
registerFunction · 0.90
loginFunction · 0.90
deletePostFunction · 0.90
addPostFunction · 0.90
addCommentFunction · 0.90
deleteCommentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected