Closed shueja closed 7 months ago
Have you tried this approach
error: {
render({ toastProps, data }) {
if (data.message === "User_Requested_Stop") {
toastProps.style = { visibility: 'hidden' };
}
return data.message;
}
}
I’d missed the toastProps
option. That should work well for this, thanks!
I'm using
toast.promise()
with success and error messages. For most errors, I have the toast show the error message. However, if the error message contains "User_Requested_Stop", I want no toast to show. Is there something I can return from theerror
callback in toast.promise() to not actually show a toast?