Revert "Merge branch 'assessment' into tutorial"
This reverts commite322795f25, reversing changes made todddd9432db.
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import { TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE } from './types';
|
||||
|
||||
import { tutorials } from '../components/Tutorial/tutorials';
|
||||
|
||||
export const tutorialChange = () => (dispatch) => {
|
||||
dispatch({
|
||||
type: TUTORIAL_CHANGE
|
||||
});
|
||||
};
|
||||
|
||||
export const tutorialCheck = (id, status) => (dispatch, getState) => {
|
||||
var tutorialsStatus = getState().tutorial.status ?
|
||||
getState().tutorial.status
|
||||
: new Array(tutorials.length).fill({});
|
||||
tutorialsStatus[id].status = status;
|
||||
console.log(tutorials);
|
||||
dispatch({
|
||||
type: status === 'success' ? TUTORIAL_SUCCESS : TUTORIAL_ERROR,
|
||||
payload: tutorialsStatus
|
||||
});
|
||||
dispatch(tutorialChange());
|
||||
// update locale storage - sync with redux store
|
||||
window.localStorage.setItem('tutorial', JSON.stringify(tutorialsStatus));
|
||||
};
|
||||
@@ -5,8 +5,3 @@ export const MOVE_BLOCK = 'MOVE_BLOCK';
|
||||
export const CHANGE_BLOCK = 'CHANGE_BLOCK';
|
||||
export const DELETE_BLOCK = 'DELETE_BLOCK';
|
||||
export const CLEAR_STATS = 'CLEAR_STATS';
|
||||
|
||||
|
||||
export const TUTORIAL_SUCCESS = 'TUTORIAL_SUCCESS';
|
||||
export const TUTORIAL_ERROR = 'TUTORIAL_ERROR';
|
||||
export const TUTORIAL_CHANGE = 'TUTORIAL_CHANGE';
|
||||
|
||||
Reference in New Issue
Block a user