adjustment of the tutorial component and all dependencies to the new tutorial.json
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_ID, TUTORIAL_LEVEL } from '../actions/types';
|
||||
import { TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_ID, TUTORIAL_STEP } from '../actions/types';
|
||||
|
||||
import { tutorials } from '../components/Tutorial/tutorials';
|
||||
|
||||
@@ -7,7 +7,8 @@ const initialState = {
|
||||
JSON.parse(window.localStorage.getItem('tutorial'))
|
||||
: new Array(tutorials.length).fill({}),
|
||||
level: 'instruction',
|
||||
currentId: null,
|
||||
currentId: 0,
|
||||
activeStep: 0,
|
||||
change: 0
|
||||
};
|
||||
|
||||
@@ -32,10 +33,10 @@ export default function(state = initialState, action){
|
||||
...state,
|
||||
currentId: action.payload
|
||||
}
|
||||
case TUTORIAL_LEVEL:
|
||||
case TUTORIAL_STEP:
|
||||
return {
|
||||
...state,
|
||||
level: action.payload
|
||||
activeStep: action.payload
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user