diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-30 04:24:31 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-30 04:24:31 +0800 |
commit | 0dbe883c3b79b88375ba15b3b8c74c5c72ec684d (patch) | |
tree | eb48970fb20b07fc4a3244c7c4bfb4fffaaaa1ea | |
parent | 5207dfdc0e1abf97381e7c710ea8713bef23f830 (diff) | |
download | dexon-0x-contracts-0dbe883c3b79b88375ba15b3b8c74c5c72ec684d.tar.gz dexon-0x-contracts-0dbe883c3b79b88375ba15b3b8c74c5c72ec684d.tar.zst dexon-0x-contracts-0dbe883c3b79b88375ba15b3b8c74c5c72ec684d.zip |
Fix onboarding always starting
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 6ef8fced1..52a045573 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -44,8 +44,9 @@ export interface PortalOnboardingFlowProps extends RouteComponentProps<any> { class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProps> { private _unlisten: () => void; public componentDidMount(): void { - this._autoStartOnboardingIfShould(); this._adjustStepIfShould(); + // Wait until the step is adjusted to decide whether we should show onboarding. + setTimeout(this._autoStartOnboardingIfShould.bind(this), 250); // If there is a route change, just close onboarding. this._unlisten = this.props.history.listen(() => this.props.updateIsRunning(false)); } |