timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.55k stars 313 forks source link

Feature optional msgs #270

Closed manojgetwealthy closed 1 year ago

manojgetwealthy commented 1 year ago

Hi Timolins,

This PR contains changes for the toast.promise function.

About: Feature is added to use toast.promise without passing options for success and error message.

Usecase: ** It is a very common use case where someone wants to fetch some information (e.g: on a form submission) by making an api call and depending on the result, the user will be redirected to a different page.

While fetching information, we can show a loading toaster but after the results are obtained we don't want the user to show another toaster for 'success' msg and directly redirect the user to a different page based on the response.

Please let me know your feedback on this.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-hot-toast ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 27, 2023 at 7:43AM (UTC)
irf4nmohd commented 1 year ago

Hi, @manojgetwealthy how you are running the application locally? when I tried to run the site I'm able to debug with the compressed code from DIST. Please can you help to change the configuration so that I can map the code from src and able to debug

manojgetwealthy commented 1 year ago

@irf4nmohd Just set minify property to false inside config file for tsup (tsupconfig.ts) and try.

manojgetwealthy commented 1 year ago

Closing it due to no response from user.