From bc444149d5a8fa8bfb4c0f78f51163d71bdd12d9 Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Fri, 9 Nov 2018 13:49:17 -0500 Subject: [PATCH] export tutorial initialization for www Export the tutorial card URL query string handling for www. Also fix typo --- src/index.js | 7 +++++-- src/lib/app-state-hoc.jsx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 237c1093d..24b2164df 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ import GUI from './containers/gui.jsx'; import AppStateHOC from './lib/app-state-hoc.jsx'; -import GuiReducer, {guiInitialState, guiMiddleware, initFullScreen, initPlayer} from './reducers/gui'; +import {detectTutorialId} from './lib/tutorial-from-url'; +import GuiReducer, {guiInitialState, guiMiddleware, initFullScreen, initPlayer, initTutorialCard} from './reducers/gui'; import LocalesReducer, {localesInitialState, initLocale} from './reducers/locales'; import {ScratchPaintReducer} from 'scratch-paint'; import {setFullScreen, setPlayer} from './reducers/mode'; @@ -24,5 +25,7 @@ export { initLocale, localesInitialState, setFullScreen, - setPlayer + setPlayer, + detectTutorialId, + initTutorialCard }; diff --git a/src/lib/app-state-hoc.jsx b/src/lib/app-state-hoc.jsx index 79d144681..c8e70f25e 100644 --- a/src/lib/app-state-hoc.jsx +++ b/src/lib/app-state-hoc.jsx @@ -70,7 +70,7 @@ const AppStateHOC = function (WrappedComponent, localesOnly) { if (tutorialId !== null) { // When loading a tutorial from the URL, // load w/o preview modal - // open requested tutorial card or tutorials mocal for 'all' + // open requested tutorial card or tutorials library modal for 'all' if (tutorialId === 'all') { initializedGui = initTutorialLibrary(initializedGui); } else {