Closed dudo closed 1 year ago
This is what I've come up with so far...
const toastId = toast.loading("Saving...");
myPromise.then(({ error }) => {
if (error) {
toast.error(error.message, {
id: toastId,
});
} else {
toast.success("Saved!", {
id: toastId,
});
}
});
I think this answers my question for now.
I'm working with an api client that will never reject (URQL). Is there a way to dynamically change the icon (and duration for that matter) within a success response?