refactor: moved mutate to 'finally' block (#1722)
* refactor: moved mutate to 'finally' block fix: content for success * fix: invited -> added
This commit is contained in:
parent
98d9763f8e
commit
81b1405448
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,6 @@ const SendProjectInvitationModal: React.FC<Props> = ({ 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<Props> = ({ isOpen, setIsOpen, member
|
|||
})
|
||||
.finally(() => {
|
||||
reset(defaultValues);
|
||||
mutate(PROJECT_MEMBERS(projectId.toString()));
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue