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

Toast persists after page navigation #340

Open
simerlec opened this issue Jan 29, 2024 · 1 comment
Open

Toast persists after page navigation #340

simerlec opened this issue Jan 29, 2024 · 1 comment

Comments

@simerlec
Copy link

Hello 👋

thank you for the lib.

I believe I've found an issue when using it in a Nextjs application on page navigation. Here's a repo for what I encountered https://stackblitz.com/edit/stackblitz-starters-tvmp57?file=app%2Fpage.tsx&file=app%2Fpage2%2Fpage.tsx

The gist of it is, that we have a link to another page in one of our toasts and are dismissing it right after the user clicks the link. So toast shows up -> user clicks link in the toast -> dismiss (all) toast(s) -> navigate to new page. What happens now is that the dismiss call does not really work here. The toast briefly show up on the new page (and on subsequent navigations as well, which is especially jarring). Can it be the case that the navigation somehow interferes with the complete removal of the toast? I read in the docs that the dismiss function only triggers the exit animation and the toast gets removed after 1 second. Is that the problem here?

thank you and kind regards

Chris

@ParallelUniv3rse
Copy link

Seems like duplicate of #128

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