Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleCallback = data => {
const { index, type } = data;
if (type === EVENTS.TOUR_END && this.state.run) {
this.setState({ run: false });
} else if (type === EVENTS.TARGET_NOT_FOUND) {
this.setState({ run: false });
} else if (type === EVENTS.STEP_AFTER) {
const currentStep = this.state.steps[index].name;
setUserGuideStepStatus(currentStep);
this.setState({ stepIndex: index + 1 });
}
};