diff --git a/src/actions/tutorialActions.js b/src/actions/tutorialActions.js index c6efc3e..ec0e67b 100644 --- a/src/actions/tutorialActions.js +++ b/src/actions/tutorialActions.js @@ -18,13 +18,14 @@ export const getTutorial = (id) => (dispatch, getState) => { type: GET_TUTORIAL, payload: tutorial }); + dispatch(returnSuccess(res.data.message, res.status)); }); }) .catch(err => { - dispatch({type: TUTORIAL_PROGRESS}); if(err.response){ dispatch(returnErrors(err.response.data.message, err.response.status, 'GET_TUTORIAL_FAIL')); } + dispatch({type: TUTORIAL_PROGRESS}); }); }; @@ -44,13 +45,14 @@ export const getTutorials = () => (dispatch, getState) => { payload: tutorials }); dispatch({type: TUTORIAL_PROGRESS}); + dispatch(returnSuccess(res.data.message, res.status)); }); }) .catch(err => { - dispatch({type: TUTORIAL_PROGRESS}); if(err.response){ dispatch(returnErrors(err.response.data.message, err.response.status, 'GET_TUTORIALS_FAIL')); } + dispatch({type: TUTORIAL_PROGRESS}); }); }; diff --git a/src/components/Tutorial/Assessment.js b/src/components/Tutorial/Assessment.js index 14ad23b..be845ee 100644 --- a/src/components/Tutorial/Assessment.js +++ b/src/components/Tutorial/Assessment.js @@ -34,7 +34,7 @@ class Assessment extends Component { return (