Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different tours on the same screen and same component does not work #152

Open
taniibarra opened this issue Feb 26, 2024 · 1 comment
Open

Comments

@taniibarra
Copy link

taniibarra commented Feb 26, 2024

I need to show two different tours on the same screen, same component and same user, but at different times. When I import the controller and pass a different key to the other controller, it does not open any tour. How do I solve this?
Example:

const { canStart, start, eventEmitter } =
useTourGuideController('collaborators');

const { canStart, start, eventEmitter, tourKey, getCurrentStep } =
useTourGuideController('onboarding');

@xcarpentier

@PriyavKaneria
Copy link

You can do something like

const { canStart, start, eventEmitter } =
useTourGuideController('collaborators');

const { canStart: canStartOnboarding, start: startOnboarding, eventEmitter: eventEmitterOnboarding, tourKey: tourKeyOnboarding, getCurrentStep: getCurrentStepOnboarding } =
useTourGuideController('onboarding');

and then use start() for collaborators and startOnboarding() for onboarding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants