How to use the react-joyride/es/constants.EVENTS.TARGET_NOT_FOUND function in react-joyride

To help you get started, we’ve selected a few react-joyride examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Criptext / Criptext-Email-React-Client / email_mailbox / src / components / UserGuide.js View on Github external
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 });
    }
  };