diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-28 09:21:51 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-28 09:21:51 +0800 |
commit | 4454cfa65dfb2f0928cddc8732a64010b0c5f0d8 (patch) | |
tree | 7bece7be80044428384dbc589d1ec8c776c0ce83 /packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | |
parent | 382839464f7d554bfc89176f669c4d72df6093f3 (diff) | |
download | dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.tar dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.tar.gz dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.tar.bz2 dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.tar.lz dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.tar.xz dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.tar.zst dexon-0x-contracts-4454cfa65dfb2f0928cddc8732a64010b0c5f0d8.zip |
Customize flow depending on what steps you've completed
Diffstat (limited to 'packages/website/ts/components/onboarding/portal_onboarding_flow.tsx')
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 4dfc948a5..2102f39f9 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -96,7 +96,15 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp { target: '.wallet', title: 'Add ETH', - content: <AddEthOnboardingStep />, + content: ( + <AddEthOnboardingStep + hasEth={ + !_.isUndefined(this.props.userEtherBalanceInWei) + ? this.props.userEtherBalanceInWei.gt(0) + : false + } + /> + ), placement: 'right', continueButtonDisplay: this._userHasVisibleEth() ? 'enabled' : 'disabled', }, @@ -119,7 +127,9 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp title: 'Step 1: Wrap ETH', content: ( <WrapEthOnboardingStep3 - formattedEthBalance={this._userHasVisibleWeth() ? this._getFormattedWethBalance() : '0 WETH'} + formattedWethBalanceIfExists={ + this._userHasVisibleWeth() ? this._getFormattedWethBalance() : undefined + } /> ), placement: 'right', @@ -127,7 +137,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp }, { target: '.wallet', - title: 'Step 2/2', + title: 'Step 2: Unlock Tokens', content: ( <SetAllowancesOnboardingStep zrxAllowanceToggle={this._renderZrxAllowanceToggle()} |