From 857b1ce2e1e6373cd0660dc786a8efbb10906468 Mon Sep 17 00:00:00 2001 From: bloodyowl Date: Wed, 29 Jan 2025 14:14:32 +0100 Subject: [PATCH] Prevent calling the account closing again if nothing matches --- clients/banking/src/components/AccountClose.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/clients/banking/src/components/AccountClose.tsx b/clients/banking/src/components/AccountClose.tsx index d58ba69cd..865d8fd22 100644 --- a/clients/banking/src/components/AccountClose.tsx +++ b/clients/banking/src/components/AccountClose.tsx @@ -332,6 +332,7 @@ export const AccountClose = ({ accountId, resourceId, status }: Props) => { match(data) .with(AsyncData.P.Done(Result.P.Ok(P.select({ user: P.nonNullable }))), ({ user }) => { if ( + user.accountMemberships.pageInfo.hasNextPage === true && !user.accountMemberships.edges.some(membership => membership.node.accountId === accountId) ) { setVariables({ after: user.accountMemberships.pageInfo.endCursor });