Redirecting with NextJs
Closed this issue · 2 comments
developersaintt commented
I'm using NextJs and I have the one step on page 1 and then after that step 2-5 are on page 2 whenever I redirect to page 2 the step 1 still remains in the window? how do i remove the page step1 once the user has redirected to page 2?
Thanks
kseymou1 commented
Is this only related to NextJs? I am using plain react and react-router. And when I route to a new page while the tour is open, it stays open.
Not sure if this is considered an issue with ShepherdJS or not. Maybe I should close my tour before react-router unloading my page.
chuckcarpenter commented
@developersaintt you'll need to trigger the next step once your page has transitioned. https://shepherdjs.dev/docs/Tour.html#next is the method you need to do this.