How to use the react-joyride.STATUS.FINISHED 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 burtonator / polar-bookshelf / web / js / apps / repository / RepositoryTour.tsx View on Github external
if (callbackProps.status === STATUS.SKIPPED || callbackProps.status === STATUS.FINISHED) {

            try {

                // FIXME?
                // this.setState({ run: false, stepIndex: 0 });

                switch (callbackProps.status) {
                    case STATUS.SKIPPED:
                        RendererAnalytics.event({category: 'tour-result', action: 'skipped'});
                        RendererAnalytics.event({category: 'tour-skip', action: 'skipped-at-step-' + callbackProps.index});

                        LifecycleToggle.mark(LifecycleEvents.TOUR_SKIPPED);
                        break;
                    case STATUS.FINISHED:
                        RendererAnalytics.event({category: 'tour-result', action: 'finished'});

                        LifecycleToggle.mark(LifecycleEvents.TOUR_FINISHED);
                        break;
                }

            } finally {
                LifecycleToggle.mark(LifecycleEvents.TOUR_TERMINATED);
            }

        } else if (callbackProps.type === EVENTS.STEP_AFTER) {

            if ( ! this.state.run) {

                setTimeout(() => {
github mitmedialab / gobo / client / app / components / Tour / Tour.js View on Github external
joyrideCallback = (data) => {
    const { status } = data;
    if (status === STATUS.FINISHED) {
      ls.set(LS_TOUR_KEY, true);
      this.setState({
        tourCompleted: true,
      });
    }
  }
github burtonator / polar-bookshelf / web / js / apps / viewer / ViewerTour.tsx View on Github external
RendererAnalytics.event({category: 'viewer-tour-steps', action: 'did-step-' + callbackProps.index});

        if (callbackProps.status === STATUS.SKIPPED || callbackProps.status === STATUS.FINISHED) {

            try {

                switch (callbackProps.status) {

                    case STATUS.SKIPPED:
                        RendererAnalytics.event({category: 'viewer-tour-result', action: 'skipped'});
                        RendererAnalytics.event({category: 'viewer-tour-skip', action: 'skipped-at-step-' + callbackProps.index});

                        LifecycleToggle.mark(LifecycleEvents.VIEWER_TOUR_SKIPPED);
                        break;

                    case STATUS.FINISHED:
                        RendererAnalytics.event({category: 'viewer-tour-result', action: 'finished'});

                        LifecycleToggle.mark(LifecycleEvents.VIEWER_TOUR_FINISHED);
                        break;
                }

            } finally {
                LifecycleToggle.mark(LifecycleEvents.VIEWER_TOUR_TERMINATED);
            }

        }

    }