Skip to content

Commit 6a9c191

Browse files
committed
Don’t show try-it modal if there’s a tutorial
Also pull out `onUpdateReduxDeck` prop out to avoid warning when it’s passed to nested components.
1 parent 4b5c483 commit 6a9c191

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/containers/gui.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class GUI extends React.Component {
8888
isShowingProject,
8989
onStorageInit,
9090
onUpdateProjectId,
91+
onUpdateReduxDeck,
9192
onUpdateReduxProjectTitle,
9293
projectHost,
9394
projectId,

src/lib/app-state-hoc.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ const AppStateHOC = function (WrappedComponent, localesOnly) {
3131
let reducers = {};
3232
let enhancer;
3333

34+
this.state = {
35+
hideIntro: false
36+
};
37+
3438
let initializedLocales = localesInitialState;
3539
const locale = detectLocale(Object.keys(locales));
3640
if (locale !== 'en') {
@@ -70,6 +74,7 @@ const AppStateHOC = function (WrappedComponent, localesOnly) {
7074
// if we decide to keep this for www, functionality should move to
7175
// setActiveCards in the GUI container
7276
if (tutorialId === 'all') initializedGui = initTutorialLibrary(initializedGui);
77+
if (tutorialId) this.state.hideIntro = true;
7378
}
7479
reducers = {
7580
locales: localesReducer,
@@ -107,7 +112,7 @@ const AppStateHOC = function (WrappedComponent, localesOnly) {
107112
return (
108113
<Provider store={this.store}>
109114
<ConnectedIntlProvider>
110-
<WrappedComponent {...componentProps} />
115+
<WrappedComponent {...componentProps} hideIntro={this.state.hideIntro}/>
111116
</ConnectedIntlProvider>
112117
</Provider>
113118
);

0 commit comments

Comments
 (0)