diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-05-25 04:02:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-25 04:02:45 +0800 |
commit | b39aa5d359df8ed92a8d576b5532490dc5b19ba1 (patch) | |
tree | d8baa9253782d0ce5a333534cc49fef45f6f9f83 /packages/website/ts/redux | |
parent | de1ff52de3c9953dfb60283c8025b73d6e417029 (diff) | |
parent | f8f8bd95ca8ef94b583766d3d8c9d9ac71f04938 (diff) | |
download | dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.tar dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.tar.gz dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.tar.bz2 dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.tar.lz dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.tar.xz dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.tar.zst dexon-sol-tools-b39aa5d359df8ed92a8d576b5532490dc5b19ba1.zip |
Merge pull request #607 from 0xProject/feature/website/onboarding-setup
Set up structure for onboarding flow along with basic step 0
Diffstat (limited to 'packages/website/ts/redux')
-rw-r--r-- | packages/website/ts/redux/dispatcher.ts | 7 | ||||
-rw-r--r-- | packages/website/ts/redux/reducer.ts | 21 |
2 files changed, 27 insertions, 1 deletions
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts index 340b80d49..0b4cc3938 100644 --- a/packages/website/ts/redux/dispatcher.ts +++ b/packages/website/ts/redux/dispatcher.ts @@ -174,6 +174,13 @@ export class Dispatcher { }); } + public updatePortalOnboardingShowing(isShowing: boolean): void { + this._dispatch({ + data: isShowing, + type: ActionTypes.UpdatePortalOnboardingShowing, + }); + } + // Docs public updateCurrentDocsVersion(version: string): void { this._dispatch({ diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index fba6afa5d..e61345c87 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -40,6 +40,8 @@ export interface State { lastForceTokenStateRefetch: number; userAddress: string; userEtherBalanceInWei: BigNumber; + portalOnboardingStep: number; + isPortalOnboardingShowing: boolean; // Note: cache of supplied orderJSON in fill order step. Do not use for anything else. userSuppliedOrderCache: Order; @@ -80,7 +82,8 @@ const INITIAL_STATE: State = { userAddress: '', userEtherBalanceInWei: new BigNumber(0), userSuppliedOrderCache: undefined, - + portalOnboardingStep: 0, + isPortalOnboardingShowing: false, // Docs docsVersion: DEFAULT_DOCS_VERSION, availableDocVersions: [DEFAULT_DOCS_VERSION], @@ -293,6 +296,22 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State { }; } + case ActionTypes.UpdatePortalOnboardingStep: { + const portalOnboardingStep = action.data; + return { + ...state, + portalOnboardingStep, + }; + } + + case ActionTypes.UpdatePortalOnboardingShowing: { + const isPortalOnboardingShowing = action.data; + return { + ...state, + isPortalOnboardingShowing, + }; + } + // Docs case ActionTypes.UpdateLibraryVersion: { return { |