From 39ccb2df0b43d3915337259789c393e4603b964c Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 20 Jun 2018 11:25:59 -0700 Subject: Scroll to wallet for mobile onboarding --- packages/website/ts/components/portal/portal.tsx | 51 +++++++++++++----------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index 3d7bbfd0a..b1860954c 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -345,29 +345,30 @@ export class Portal extends React.Component { return (
{isMobile && {startOnboarding}} - + + + {!isMobile && {startOnboarding}}
); @@ -400,6 +401,10 @@ export class Portal extends React.Component { const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId]; analytics.logEvent('Portal', 'Onboarding Started - Manual', networkName, this.props.portalOnboardingStep); this.props.dispatcher.updatePortalOnboardingShowing(true); + // On mobile, make sure the wallet is completely visible. + if (this.props.screenWidth === ScreenWidths.Sm) { + document.querySelector('.wallet').scrollIntoView(); + } } private _renderWalletSection(): React.ReactNode { return
} body={this._renderWallet()} />; -- cgit v1.2.3