Skip to content

Commit

Permalink
Prevent calling the account closing again if nothing matches
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl committed Jan 29, 2025
1 parent 172c616 commit 857b1ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clients/banking/src/components/AccountClose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 857b1ce

Please sign in to comment.