adjustment of the tutorial component and all dependencies to the new tutorial.json

This commit is contained in:
Delucse
2020-09-11 10:13:33 +02:00
parent 33445cf67c
commit 6c3709fde8
14 changed files with 368 additions and 324 deletions
+5 -4
View File
@@ -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;