From 81b14054480d86746a69a4aaad0acb378845a8c5 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:21:37 +0530 Subject: [PATCH] refactor: moved mutate to 'finally' block (#1722) * refactor: moved mutate to 'finally' block fix: content for success * fix: invited -> added --- apps/app/components/project/send-project-invitation-modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/components/project/send-project-invitation-modal.tsx b/apps/app/components/project/send-project-invitation-modal.tsx index c2c1f4eda..b74255a2f 100644 --- a/apps/app/components/project/send-project-invitation-modal.tsx +++ b/apps/app/components/project/send-project-invitation-modal.tsx @@ -93,7 +93,6 @@ const SendProjectInvitationModal: React.FC = ({ isOpen, setIsOpen, member .inviteProject(workspaceSlug as string, projectId as string, payload, user) .then(() => { setIsOpen(false); - mutate(PROJECT_MEMBERS(projectId as string)); setToastAlert({ title: "Success", type: "success", @@ -105,6 +104,7 @@ const SendProjectInvitationModal: React.FC = ({ isOpen, setIsOpen, member }) .finally(() => { reset(defaultValues); + mutate(PROJECT_MEMBERS(projectId.toString())); }); };