Invalidate instead of hard reload

This commit is contained in:
Daniel Hougaard
2024-06-17 22:35:35 +02:00
parent 54c8da8ab6
commit f121f8e828
2 changed files with 8 additions and 7 deletions
@@ -114,9 +114,10 @@ export const DeleteProjectSection = () => {
}
}
// If it's actually a no-access member, then we don't really care about the members.
await leaveProject.mutateAsync({
workspaceId: currentWorkspace.id,
organizationId: currentOrg.id
workspaceId: currentWorkspace.id
});
router.push(`/org/${currentOrg.id}/overview`);
@@ -152,7 +153,7 @@ export const DeleteProjectSection = () => {
</Button>
)}
</ProjectPermissionCan>
{!!isOnlyAdminMember && (
{!isOnlyAdminMember && (
<Button
disabled={isMembersLoading || (members && members?.length < 2)}
isLoading={isLeaving}