Break wrath ETH step into 2
This commit is contained in:
parent
3c68d9c297
commit
aad0804a1e
@ -71,7 +71,7 @@ export class OnboardingFlow extends React.Component<OnboardingFlowProps> {
|
||||
const step = steps[stepIndex];
|
||||
const isLastStep = steps.length - 1 === stepIndex;
|
||||
return (
|
||||
<Container marginLeft="30px" maxWidth={350}>
|
||||
<Container marginLeft="30px" width="400px">
|
||||
<OnboardingTooltip
|
||||
title={step.title}
|
||||
content={step.content}
|
||||
|
@ -12,7 +12,7 @@ import { IntroOnboardingStep } from 'ts/components/onboarding/intro_onboarding_s
|
||||
import { OnboardingFlow, Step } from 'ts/components/onboarding/onboarding_flow';
|
||||
import { SetAllowancesOnboardingStep } from 'ts/components/onboarding/set_allowances_onboarding_step';
|
||||
import { UnlockWalletOnboardingStep } from 'ts/components/onboarding/unlock_wallet_onboarding_step';
|
||||
import { WrapEthOnboardingStep } from 'ts/components/onboarding/wrap_eth_onboarding_step';
|
||||
import { WrapEthOnboardingStep1, WrapEthOnboardingStep2 } from 'ts/components/onboarding/wrap_eth_onboarding_step';
|
||||
import { AllowanceToggle } from 'ts/containers/inputs/allowance_toggle';
|
||||
import { ProviderType, ScreenWidths, Token, TokenByAddress, TokenStateByAddress } from 'ts/types';
|
||||
import { analytics } from 'ts/utils/analytics';
|
||||
@ -98,16 +98,21 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
|
||||
},
|
||||
{
|
||||
target: '.wallet',
|
||||
title: 'Step 1/2',
|
||||
title: 'Step 1: Wrap ETH',
|
||||
content: <WrapEthOnboardingStep1 />,
|
||||
placement: 'right',
|
||||
continueButtonDisplay: this._userHasVisibleWeth() ? 'enabled' : undefined,
|
||||
},
|
||||
{
|
||||
target: '.wallet',
|
||||
title: 'Step 1: Wrap ETH',
|
||||
content: (
|
||||
<WrapEthOnboardingStep
|
||||
formattedEthBalanceIfExists={
|
||||
this._userHasVisibleWeth() ? this._getFormattedWethBalance() : undefined
|
||||
}
|
||||
<WrapEthOnboardingStep2
|
||||
formattedEthBalance={this._userHasVisibleWeth() ? this._getFormattedWethBalance() : '0 WETH'}
|
||||
/>
|
||||
),
|
||||
placement: 'right',
|
||||
continueButtonDisplay: this._userHasVisibleWeth() ? 'enabled' : undefined,
|
||||
continueButtonDisplay: 'enabled',
|
||||
},
|
||||
{
|
||||
target: '.wallet',
|
||||
|
@ -4,36 +4,9 @@ import { Container } from 'ts/components/ui/container';
|
||||
import { IconButton } from 'ts/components/ui/icon_button';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
|
||||
export interface WrapEthOnboardingStepProps {
|
||||
formattedEthBalanceIfExists?: string;
|
||||
}
|
||||
export interface WrapEthOnboardingStep1Props {}
|
||||
|
||||
export const WrapEthOnboardingStep: React.StatelessComponent<WrapEthOnboardingStepProps> = ({
|
||||
formattedEthBalanceIfExists,
|
||||
}) => {
|
||||
if (formattedEthBalanceIfExists) {
|
||||
return (
|
||||
<div className="flex items-center flex-column">
|
||||
<Text>Congrats you now have {formattedEthBalanceIfExists} in your wallet.</Text>
|
||||
<Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-center">
|
||||
<div className="flex flex-column items-center">
|
||||
<Text fontWeight={700}> 1 ETH </Text>
|
||||
<img src="/images/eth_dollar.svg" height="75px" width="75x" />
|
||||
</div>
|
||||
<Container marginRight="25px" marginLeft="25px" position="relative" top="20px">
|
||||
<Text fontSize="25px">
|
||||
<i className="zmdi zmdi-long-arrow-right" />
|
||||
</Text>
|
||||
</Container>
|
||||
<div className="flex flex-column items-center">
|
||||
<Text fontWeight={700}> 1 WETH </Text>
|
||||
<img src="/images/eth_token_erc20.svg" height="75px" width="75px" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
export const WrapEthOnboardingStep1: React.StatelessComponent<WrapEthOnboardingStep1Props> = () => (
|
||||
<div className="flex items-center flex-column">
|
||||
<Text>
|
||||
You need to convert some of your ETH into tradeable <b>Wrapped ETH (WETH)</b>.
|
||||
@ -52,8 +25,7 @@ export const WrapEthOnboardingStep: React.StatelessComponent<WrapEthOnboardingSt
|
||||
</div>
|
||||
</Container>
|
||||
<Text>
|
||||
Think of it like the coin version of a paper note. It has the same value, but some machines only
|
||||
take coins.
|
||||
Think of it like the coin version of a paper note. It has the same value, but some machines only take coins.
|
||||
</Text>
|
||||
<Text>
|
||||
Click
|
||||
@ -69,5 +41,30 @@ export const WrapEthOnboardingStep: React.StatelessComponent<WrapEthOnboardingSt
|
||||
</Text>
|
||||
</div>
|
||||
);
|
||||
|
||||
export interface WrapEthOnboardingStep2Props {
|
||||
formattedEthBalance: string;
|
||||
}
|
||||
};
|
||||
|
||||
export const WrapEthOnboardingStep2: React.StatelessComponent<WrapEthOnboardingStep2Props> = ({
|
||||
formattedEthBalance,
|
||||
}) => (
|
||||
<div className="flex items-center flex-column">
|
||||
<Text>You currently have {formattedEthBalance} in your wallet.</Text>
|
||||
<Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-center">
|
||||
<div className="flex flex-column items-center">
|
||||
<Text fontWeight={700}> 1 ETH </Text>
|
||||
<img src="/images/eth_dollar.svg" height="75px" width="75x" />
|
||||
</div>
|
||||
<Container marginRight="25px" marginLeft="25px" position="relative" top="20px">
|
||||
<Text fontSize="25px">
|
||||
<i className="zmdi zmdi-long-arrow-right" />
|
||||
</Text>
|
||||
</Container>
|
||||
<div className="flex flex-column items-center">
|
||||
<Text fontWeight={700}> 1 WETH </Text>
|
||||
<img src="/images/eth_token_erc20.svg" height="75px" width="75px" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user