Skip to content

Commit

Permalink
increase query invalidation specificity
Browse files Browse the repository at this point in the history
-update comment
  • Loading branch information
otobot1 committed Sep 28, 2024
1 parent 75eb0f7 commit d628306
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/claim-user/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ const ClaimUser: NextPage = () => {
const userClaims = userClaimsQuery.data ?? [];


// Separate legacy users based on if the current user has claimed them
// Sort legacy users based on if the current user has claimed them
type UnlinkedUser = typeof unlinkedUsers[number];

const claimedUsers: UnlinkedUser[] = [];
const unclaimedUsers: UnlinkedUser[] = [];

Expand All @@ -66,8 +67,8 @@ const ClaimUser: NextPage = () => {
const utils = api.useUtils();

const createUserClaimMutation = api.user.userClaim.add.useMutation({
onSuccess() {
void utils.user.userClaim.getByClaimingUserId.invalidate();
onSuccess(input) {
utils.user.userClaim.getByClaimingUserId.invalidate({ userId });
}
});

Expand Down

0 comments on commit d628306

Please sign in to comment.