diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-30 04:27:19 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-30 04:27:19 +0800 |
commit | e693629bbd2061030fecae80e3566eaa28faad2e (patch) | |
tree | 17d70761c92668bb02e6b925a7998cc85b9fff03 /packages/website/ts/components/onboarding | |
parent | 0dbe883c3b79b88375ba15b3b8c74c5c72ec684d (diff) | |
parent | cc12bc9247d432b7f1248c8c0aaf9f905fa58d6d (diff) | |
download | dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.tar dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.tar.gz dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.tar.bz2 dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.tar.lz dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.tar.xz dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.tar.zst dexon-sol-tools-e693629bbd2061030fecae80e3566eaa28faad2e.zip |
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-onboarding-polish
Diffstat (limited to 'packages/website/ts/components/onboarding')
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 8 |
1 files changed, 7 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 52a045573..f5a36b1c6 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -53,8 +53,14 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp public componentWillUnmount(): void { this._unlisten(); } - public componentDidUpdate(): void { + public componentDidUpdate(prevProps: PortalOnboardingFlowProps): void { this._adjustStepIfShould(); + if (!prevProps.isRunning && this.props.isRunning) { + // On mobile, make sure the wallet is completely visible. + if (this.props.screenWidth === ScreenWidths.Sm) { + document.querySelector('.wallet').scrollIntoView(); + } + } } public render(): React.ReactNode { return ( |