aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/onboarding
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-30 02:55:00 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-30 02:55:00 +0800
commit03bc7bb935c71106dd3c5b577d08ca3b12977e5f (patch)
tree62ba2856e1fc7a720c9f93a04076de8a26df16c4 /packages/website/ts/components/onboarding
parentf89acb49be50ad6d9814dafb580b28722d9a161a (diff)
downloaddexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.tar
dexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.tar.gz
dexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.tar.bz2
dexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.tar.lz
dexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.tar.xz
dexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.tar.zst
dexon-sol-tools-03bc7bb935c71106dd3c5b577d08ca3b12977e5f.zip
Move wallet scrollIntoView into PortalOnboardingFlow
Diffstat (limited to 'packages/website/ts/components/onboarding')
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx8
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 296b410fe..ccc8d9e86 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -47,8 +47,14 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
public componentWillUnmount(): void {
this._unlisten();
}
- public componentDidUpdate(): void {
+ public componentDidUpdate(prevProps: PortalOnboardingFlowProps): void {
this._overrideOnboardingStateIfShould();
+ 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 (