if (isError) {
toast.error(toastMessage.error, { id: toastStatus.current });
toastStatus.current = 'done';
} else if (isLoading) {
toastStatus.current = toast.loading(toastMessage.loading, { id: toastStatus.current });
} else if (isSuccess) {
toastStatus.current = toast.success(toastMessage.success, { id: toastStatus.current });
} else if (data) {
toast.success(toastMessage.success, { id: toastStatus.current });
toastStatus.current = 'done';
}
this way "it works" but there still stays an toast in the state with status "idle" but it does not affect the ui.. but doesnt feel good
After all i'm wondering if this bug is already noticed? or maybe i implemented something wrong? i'm wondering since script and instruction are realy clear