diff options
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r-- | packages/website/ts/containers/portal_onboarding_flow.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/website/ts/containers/portal_onboarding_flow.ts b/packages/website/ts/containers/portal_onboarding_flow.ts index 46c23f62f..7e4b3ef39 100644 --- a/packages/website/ts/containers/portal_onboarding_flow.ts +++ b/packages/website/ts/containers/portal_onboarding_flow.ts @@ -1,6 +1,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; +import { ActionTypes } from 'ts/types'; import { PortalOnboardingFlow as PortalOnboardingFlowComponent, @@ -13,6 +14,10 @@ interface ConnectedState { isRunning: boolean; } +interface ConnectedDispatch { + setOnboardingShowing: (isShowing: boolean) => void; +} + const mapStateToProps = (state: State, ownProps: PortalOnboardingFlowComponentProps): ConnectedState => { return { stepIndex: state.portalOnboardingStep, @@ -20,4 +25,13 @@ const mapStateToProps = (state: State, ownProps: PortalOnboardingFlowComponentPr }; }; -export const PortalOnboardingFlow: React.ComponentClass<PortalOnboardingFlowComponentProps> = connect(mapStateToProps)(PortalOnboardingFlowComponent); +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + setOnboardingShowing: (isShowing: boolean): void => { + dispatch({ + type: ActionTypes.UpdatePortalOnboardingShowing, + data: isShowing, + }); + }, +}); + +export const PortalOnboardingFlow: React.ComponentClass<PortalOnboardingFlowComponentProps> = connect(mapStateToProps, mapDispatchToProps)(PortalOnboardingFlowComponent); |