Fix issue where modal can be out of sync with app state
This commit is contained in:
@@ -1,29 +1,36 @@
|
||||
import * as React from 'react';
|
||||
import { Step } from 'react-joyride';
|
||||
|
||||
import { OnboardingFlow } from 'ts/components/onboarding/onboarding_flow';
|
||||
|
||||
export interface PortalOnboardingFlowProps {
|
||||
stepIndex: number;
|
||||
isRunning: boolean;
|
||||
setOnboardingShowing: (isShowing: boolean) => void;
|
||||
}
|
||||
|
||||
const steps = [
|
||||
const steps: Step[] = [
|
||||
{
|
||||
target: '.wallet',
|
||||
content: 'Hey!',
|
||||
content: 'You are onboarding right now!',
|
||||
placement: 'right',
|
||||
disableBeacon: true,
|
||||
},
|
||||
];
|
||||
|
||||
export class PortalOnboardingFlow extends React.Component<PortalOnboardingFlow> {
|
||||
export class PortalOnboardingFlow extends React.Component<PortalOnboardingFlowProps> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<OnboardingFlow
|
||||
steps={steps}
|
||||
stepIndex={this.props.stepIndex}
|
||||
isRunning={this.props.isRunning}
|
||||
onClose={this._handleClose.bind(this)}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
private _handleClose(): void {
|
||||
this.props.setOnboardingShowing(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user