aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/containers/portal_onboarding_flow.ts
blob: 46c23f62fc38260e8040ee9a6e20e4939e84e6a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as React from 'react';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';

import {
    PortalOnboardingFlow as PortalOnboardingFlowComponent,
    PortalOnboardingFlowProps as PortalOnboardingFlowComponentProps,
} from 'ts/components/onboarding/portal_onboarding_flow';
import { State } from 'ts/redux/reducer';

interface ConnectedState {
    stepIndex: number;
    isRunning: boolean;
}

const mapStateToProps = (state: State, ownProps: PortalOnboardingFlowComponentProps): ConnectedState => {
    return {
        stepIndex: state.portalOnboardingStep,
        isRunning: state.isPortalOnboardingShowing,
    };
};

export const PortalOnboardingFlow: React.ComponentClass<PortalOnboardingFlowComponentProps> = connect(mapStateToProps)(PortalOnboardingFlowComponent);