Currently I have code that updates the current toast using the flow: action -> promise -> result. The code looks like this
const t = toast(
PopUp("out", async () => {
toast.promise(PostSignOut(userProps), {
id: t,
error: (e) => {
toast.error(
<>
{`Failed to sign out user ${uCardNumber}`}
<br />
{(e as any).toString()}
</>,
{ id: t },
);
},
success: () => {
queryClient.invalidateQueries({ queryKey: ["locationStatus", "locationList", { activeLocation }] });
toast.success(`Successfully signed out ${uCardNumber}`, { id: t });
},
});
}),
);
I'd like to not produce empty toasts at the end of this without resorting to hacks. In my mind returning undefined/void/false should be enough for a case like this. LMK if you have any other opinion :)
Describe the feature / bug š:
Currently I have code that updates the current toast using the flow: action -> promise -> result. The code looks like this
I'd like to not produce empty toasts at the end of this without resorting to hacks. In my mind returning undefined/void/false should be enough for a case like this. LMK if you have any other opinion :)