diff --git a/client/src/components/instance.ctrl.btns.jsx b/client/src/components/instance.ctrl.btns.jsx index 45c26e1f..136987c2 100644 --- a/client/src/components/instance.ctrl.btns.jsx +++ b/client/src/components/instance.ctrl.btns.jsx @@ -10,6 +10,7 @@ const addState = connect( chatShow, instance, account, + tutorial, } = state; function sendReady() { @@ -21,6 +22,7 @@ const addState = connect( instance, chatShow, account, + tutorial, sendReady, }; @@ -42,17 +44,17 @@ function InstanceCtrlBtns(args) { instance, chatShow, account, - + tutorial, sendReady, setChatShow, } = args; const finished = instance && instance.phase === 'Finished'; - + const tutorialDisable = tutorial && tutorial < 8; return (
- +
); } diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index e731ad5c..044d529a 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -95,7 +95,7 @@ function Play(args) { type="submit"> Invite -
Invite a Friend
+
Play against friend
); diff --git a/client/src/events.jsx b/client/src/events.jsx index e5d3a92b..3d5ddd83 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -116,7 +116,6 @@ function registerEvents(store) { } store.dispatch(actions.setAccount(account)); - store.dispatch(actions.setTutorial(null)); store.dispatch(actions.setAuthenticated(true)); } @@ -189,7 +188,6 @@ function registerEvents(store) { } } - return store.dispatch(actions.setInstance(v)); } diff --git a/client/src/reducers.jsx b/client/src/reducers.jsx index 6330f0eb..3c5faf4a 100644 --- a/client/src/reducers.jsx +++ b/client/src/reducers.jsx @@ -53,7 +53,7 @@ module.exports = { teamPage: createReducer(0, 'SET_TEAM_PAGE'), teamSelect: createReducer([null, null, null], 'SET_TEAM_SELECT'), - tutorial: createReducer(1, 'SET_TUTORIAL'), + tutorial: createReducer(localStorage.getItem('tutorial-complete') ? null : 1, 'SET_TUTORIAL'), vboxSelected: createReducer({ storeSelect: [], stashSelect: [] }, 'SET_VBOX_SELECTED'), vboxCombiner: createReducer(null, 'SET_VBOX_COMBINER'), diff --git a/client/src/tutorial.utils.jsx b/client/src/tutorial.utils.jsx index 85799807..2aebae73 100644 --- a/client/src/tutorial.utils.jsx +++ b/client/src/tutorial.utils.jsx @@ -197,10 +197,10 @@ function tutorialStage(tutorial, clearTutorial, instance) { } if (tutorial === 8) { + localStorage.setItem('tutorial-complete', true); if (window.innerWidth < 1000) { return exit(); } - return (

GLHF

@@ -210,6 +210,7 @@ function tutorialStage(tutorial, clearTutorial, instance) {
); } + return false; };