current tutorial id stored in redux store
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE } from './types';
|
||||
import { TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_ID } from './types';
|
||||
|
||||
export const tutorialChange = () => (dispatch) => {
|
||||
dispatch({
|
||||
@@ -15,3 +15,19 @@ export const tutorialCheck = (id, status) => (dispatch, getState) => {
|
||||
});
|
||||
dispatch(tutorialChange());
|
||||
};
|
||||
|
||||
export const storeTutorialXml = (id) => (dispatch, getState) => {
|
||||
var tutorialsStatus = getState().tutorial.status;
|
||||
tutorialsStatus[id] = {...tutorialsStatus[id]};
|
||||
dispatch({
|
||||
type: TUTORIAL_XML,
|
||||
payload: tutorialsStatus
|
||||
});
|
||||
};
|
||||
|
||||
export const tutorialId = (id) => (dispatch) => {
|
||||
dispatch({
|
||||
type: TUTORIAL_ID,
|
||||
payload: id
|
||||
});
|
||||
};
|
||||
|
||||
@@ -10,3 +10,5 @@ export const CLEAR_STATS = 'CLEAR_STATS';
|
||||
export const TUTORIAL_SUCCESS = 'TUTORIAL_SUCCESS';
|
||||
export const TUTORIAL_ERROR = 'TUTORIAL_ERROR';
|
||||
export const TUTORIAL_CHANGE = 'TUTORIAL_CHANGE';
|
||||
export const TUTORIAL_XML = 'TUTORIAL_XML';
|
||||
export const TUTORIAL_ID = 'TUTORIAL_ID';
|
||||
|
||||
Reference in New Issue
Block a user