aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-04 03:48:19 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-04 03:48:19 +0800
commita52eb813809448db4957cec5c78317419c98ddba (patch)
tree9eed7ef16440ae4d35351fc1f35fe0951b26034d /packages/website/ts/components
parentab0055d5c68bea1dec6a4bbbe4a76822783d3a2c (diff)
downloaddexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.tar
dexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.tar.gz
dexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.tar.bz2
dexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.tar.lz
dexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.tar.xz
dexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.tar.zst
dexon-sol-tools-a52eb813809448db4957cec5c78317419c98ddba.zip
Rename isMobile utility fn to be more specific and add isMobileOperatingSystem
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx2
-rw-r--r--packages/website/ts/components/portal/portal.tsx6
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
index 6bfa5c75f..d0955c2dc 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -267,7 +267,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
);
}
private _handleFinalStepContinueClick(): void {
- if (utils.isMobile(this.props.screenWidth)) {
+ if (utils.isMobileWidth(this.props.screenWidth)) {
window.scrollTo(0, 0);
this.props.history.push('/portal');
}
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
index 8c3b5cfd7..2498fb928 100644
--- a/packages/website/ts/components/portal/portal.tsx
+++ b/packages/website/ts/components/portal/portal.tsx
@@ -318,7 +318,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
);
}
private _renderWallet(): React.ReactNode {
- const isMobile = utils.isMobile(this.props.screenWidth);
+ const isMobile = utils.isMobileWidth(this.props.screenWidth);
// We need room to scroll down for mobile onboarding
const marginBottom = isMobile ? '200px' : '15px';
return (
@@ -364,7 +364,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
);
}
private _renderStartOnboarding(): React.ReactNode {
- const isMobile = utils.isMobile(this.props.screenWidth);
+ const isMobile = utils.isMobileWidth(this.props.screenWidth);
const shouldStartOnboarding = !isMobile || this.props.location.pathname === `${WebsitePaths.Portal}/account`;
const startOnboarding = (
<Container className="flex items-center center">
@@ -530,7 +530,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
return <Section header={<TextHeader labelText="0x Relayers" />} body={this._renderRelayerIndex()} />;
}
private _renderRelayerIndex(): React.ReactNode {
- const isMobile = utils.isMobile(this.props.screenWidth);
+ const isMobile = utils.isMobileWidth(this.props.screenWidth);
return (
<Container className="flex flex-column items-center">
{isMobile && <Container marginBottom="20px">{this._renderStartOnboarding()}</Container>}