From 6e05d40e2e62c581fd7e89b0896f3771ae143c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Dombya?= <135591453+hervedombya@users.noreply.github.com> Date: Fri, 31 May 2024 17:56:06 +0200 Subject: [PATCH] fix: issue with main mutation status in useMutationsHandler --- src/lib/components/toast/useMutationsHandler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/toast/useMutationsHandler.ts b/src/lib/components/toast/useMutationsHandler.ts index d80897a612..b50c148048 100644 --- a/src/lib/components/toast/useMutationsHandler.ts +++ b/src/lib/components/toast/useMutationsHandler.ts @@ -122,7 +122,9 @@ export const useMutationsHandler = < const mainMutationDesc: GetDescriptionBuilder = { data: mainMutation.mutation?.data, - status: DescriptionBuilderStatus.Success, + status: mainMutation.mutation?.isSuccess + ? DescriptionBuilderStatus.Success + : DescriptionBuilderStatus.Error, name: mainMutation.name, } as GetDescriptionBuilder; const descriptionBuilders = [