kbrgl / svelte-french-toast

🍞🥂 Buttery smooth toast notifications for Svelte
https://svelte-french-toast.vercel.app/
MIT License
809 stars 28 forks source link

keep toast alive #32

Open iraizo opened 1 year ago

iraizo commented 1 year ago

I currently have the toaster element inside +layout.svelte, but as soon as i change the window location the toast dissapears, is there a way to fix that?

kbrgl commented 1 year ago

Could you link a repo/CodeSandbox/REPL that reproduces this problem?

kbrgl commented 1 year ago

I imagine this is expected, and strategies to fix this would probably revolve around some kind of persistence of state across page transitions.

iraizo commented 1 year ago

I imagine this is expected, and strategies to fix this would probably revolve around some kind of persistence of state across page transitions.

i guess so, but it could be cool to do somehow

juslin03 commented 1 year ago

@iraizo If i got what you mean, it must be a possibility of displaying the toast even if we navigate to another page ?

You could maybe add a duration property in the options as in this screenshot, code-svelte-duration-toast