diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-05-31 02:49:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 02:49:04 +0800 |
commit | e18d61b31a22519cd7d85ecffa62925ef7adc63d (patch) | |
tree | 166746953c94bdfd62cca909553f30d96d682bd8 /packages/website/ts/containers | |
parent | b20e40dd6fd9964876a0006efe8b879a9a1d2118 (diff) | |
parent | 61cd1ae5259c03e3ae1d1711d585e2222d8cfc34 (diff) | |
download | dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.tar dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.tar.gz dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.tar.bz2 dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.tar.lz dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.tar.xz dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.tar.zst dexon-sol-tools-e18d61b31a22519cd7d85ecffa62925ef7adc63d.zip |
Merge pull request #635 from 0xProject/feature/website/custom-onboarding-tooltip
Remove react-joyride and some more refactoring
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r-- | packages/website/ts/containers/portal_onboarding_flow.ts | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/packages/website/ts/containers/portal_onboarding_flow.ts b/packages/website/ts/containers/portal_onboarding_flow.ts index 3cd4e8510..84739192f 100644 --- a/packages/website/ts/containers/portal_onboarding_flow.ts +++ b/packages/website/ts/containers/portal_onboarding_flow.ts @@ -1,7 +1,8 @@ +import { BigNumber } from '@0xproject/utils'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; -import { ActionTypes } from 'ts/types'; +import { ActionTypes, ProviderType, TokenByAddress } from 'ts/types'; import { PortalOnboardingFlow as PortalOnboardingFlowComponent } from 'ts/components/onboarding/portal_onboarding_flow'; import { State } from 'ts/redux/reducer'; @@ -11,22 +12,43 @@ interface PortalOnboardingFlowProps {} interface ConnectedState { stepIndex: number; isRunning: boolean; + userAddress: string; + hasBeenSeen: boolean; + providerType: ProviderType; + injectedProviderName: string; + blockchainIsLoaded: boolean; + userEthBalanceInWei: BigNumber; + tokenByAddress: TokenByAddress; } interface ConnectedDispatch { - onClose: () => void; + updateIsRunning: (isRunning: boolean) => void; + updateOnboardingStep: (stepIndex: number) => void; } const mapStateToProps = (state: State): ConnectedState => ({ stepIndex: state.portalOnboardingStep, isRunning: state.isPortalOnboardingShowing, + userAddress: state.userAddress, + providerType: state.providerType, + injectedProviderName: state.injectedProviderName, + blockchainIsLoaded: state.blockchainIsLoaded, + userEthBalanceInWei: state.userEtherBalanceInWei, + tokenByAddress: state.tokenByAddress, + hasBeenSeen: state.hasPortalOnboardingBeenSeen, }); const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - onClose: (): void => { + updateIsRunning: (isRunning: boolean): void => { dispatch({ type: ActionTypes.UpdatePortalOnboardingShowing, - data: false, + data: isRunning, + }); + }, + updateOnboardingStep: (stepIndex: number): void => { + dispatch({ + type: ActionTypes.UpdatePortalOnboardingStep, + data: stepIndex, }); }, }); |