diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-30 02:47:12 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-30 02:47:12 +0800 |
commit | fc40efb761514b9e22e77f61d161d267b5f4c3c0 (patch) | |
tree | 72c791a334dcc8638d82eec681f99b7dc4a0b27a /packages/website/ts/components | |
parent | 36cadaae46eb17261c6dd0ee82cd8cefb3806082 (diff) | |
download | dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.tar dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.tar.gz dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.tar.bz2 dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.tar.lz dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.tar.xz dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.tar.zst dexon-sol-tools-fc40efb761514b9e22e77f61d161d267b5f4c3c0.zip |
Allow you to continue the onboarding flow once youve installed metamask and refreshed the page
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r-- | packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx | 7 | ||||
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 16 |
2 files changed, 12 insertions, 11 deletions
diff --git a/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx b/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx index a54496186..a95c464af 100644 --- a/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx +++ b/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx @@ -8,11 +8,12 @@ export interface InstallWalletOnboardingStepProps {} export const InstallWalletOnboardingStep: React.StatelessComponent<InstallWalletOnboardingStepProps> = () => ( <div className="flex items-center flex-column"> - <Container marginTop="15px" marginBottom="15px"> - <ActionAccountBalanceWallet style={{ width: '30px', height: '30px' }} color={colors.orange} /> - </Container> <Text> Before you begin, you need to connect to a wallet. This will be used across all 0x relayers and dApps. </Text> + <Container marginTop="15px" marginBottom="15px"> + <ActionAccountBalanceWallet style={{ width: '50px', height: '50px' }} color={colors.orange} /> + </Container> + <Text>Please refresh the page once you've done this to continue!</Text> </div> ); diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 5db3a4919..3e9b0bd2c 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -28,7 +28,7 @@ export interface PortalOnboardingFlowProps extends RouteComponentProps<any> { stepIndex: number; isRunning: boolean; userAddress: string; - hasBeenSeen: boolean; + hasBeenClosed: boolean; providerType: ProviderType; injectedProviderName: string; blockchainIsLoaded: boolean; @@ -44,7 +44,8 @@ export interface PortalOnboardingFlowProps extends RouteComponentProps<any> { class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProps> { private _unlisten: () => void; public componentDidMount(): void { - this._overrideOnboardingStateIfShould(); + this._autoStartOnboardingIfShould(); + this._adjustStepIfShould(); // If there is a route change, just close onboarding. this._unlisten = this.props.history.listen(() => this.props.updateIsRunning(false)); } @@ -52,7 +53,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp this._unlisten(); } public componentDidUpdate(): void { - this._overrideOnboardingStateIfShould(); + this._adjustStepIfShould(); } public render(): React.ReactNode { return ( @@ -189,10 +190,6 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp } return false; } - private _overrideOnboardingStateIfShould(): void { - this._autoStartOnboardingIfShould(); - this._adjustStepIfShould(); - } private _adjustStepIfShould(): void { const stepIndex = this.props.stepIndex; if (this._isAddressAvailable()) { @@ -216,7 +213,10 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp } } private _autoStartOnboardingIfShould(): void { - if (!this.props.isRunning && !this.props.hasBeenSeen && this.props.blockchainIsLoaded) { + if ( + (this.props.stepIndex === 0 && !this.props.isRunning) || + (!this.props.isRunning && !this.props.hasBeenClosed && this.props.blockchainIsLoaded) + ) { const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId]; analytics.logEvent('Portal', 'Onboarding Started - Automatic', networkName, this.props.stepIndex); this.props.updateIsRunning(true); |