MCPcopy Create free account
hub / github.com/chartbrew/chartbrew / resetTutorial

Function resetTutorial

client/src/actions/tutorial.js:44–58  ·  view source on GitHub ↗
(tuts)

Source from the content-addressed store, hash-verified

42}
43
44export function resetTutorial(tuts) {
45 return (dispatch, getState) => {
46 const user = getState().user.data;
47
48 const tempTutorials = user.tutorials;
49 for (let i = 0; i < tuts.length; i++) {
50 const tut = tuts[i];
51 if (tempTutorials[tut]) {
52 delete tempTutorials[tut];
53 }
54 }
55
56 return dispatch(updateUser(user.id, { tutorials: tempTutorials }));
57 };
58}

Callers

nothing calls this directly

Calls 2

updateUserFunction · 0.90
dispatchFunction · 0.50

Tested by

no test coverage detected