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

Loading toast is removed before resolving the promise. #45

Closed
chain-xvi opened this issue Feb 15, 2021 · 7 comments · Fixed by #54 · May be fixed by vAHiD55555/proxy-provider-converter#4
Closed

Loading toast is removed before resolving the promise. #45

chain-xvi opened this issue Feb 15, 2021 · 7 comments · Fixed by #54 · May be fixed by vAHiD55555/proxy-provider-converter#4
Labels
bug Something isn't working

Comments

@chain-xvi
Copy link

I noticed a weird behavior when running a promise that takes fairly long (about 30s) the loading toast is automatically dismissed even before resolving the promise, when it's resolved the success toast appears.

Can you reproduce this? Try having a promise that takes about 30 or 40 seconds to execute.

toast.promise(subtitlesPromise, {
  loading: 'Generating your subtitles, please wait...',
  success: 'Subtitles generated!',
  error: 'Error generating subtitles.',
});

Thanks Timo for this awesome library!

@chain-xvi
Copy link
Author

@timolins any updates on this?

@timolins timolins added the bug Something isn't working label Feb 22, 2021
@timolins
Copy link
Owner

Thanks for mentioning this. This is somewhat intended, I figured that I limit loading toasts to 30s to prevent them from getting stuck: https://github.com/timolins/react-hot-toast/blob/main/src/core/store.ts#L134

Looking back, it probably wasn't the best decision. I will change this to Infinity in the next release.

@chain-xvi
Copy link
Author

Yeah, I guess that's it. Thanks a lot, Timo!

@chain-xvi
Copy link
Author

I noticed it's still not merged, any updates @timolins ?

@timolins
Copy link
Owner

Yep, sorry for the delay. Currently planing out v1.1 which includes quite a few things I want to get right. I'll hope to release in the next couple of days.

@chain-xvi
Copy link
Author

Sure and thanks.

@chain-xvi
Copy link
Author

Any updates on this? @timolins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants