diff options
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 { |