.
This commit is contained in:
1 parent
c00545f281
commit
c5d296d403
2 files changed
+48
-2
No files matched your search
@@ -278,6 +278,7 @@ export function useTournamentCodeStats(
|
||||
export function useTournamentCodes(
|
||||
options: { state?: TournamentCodeState; limit?: number },
|
||||
communityId = DEFAULT_COMMUNITY_ID,
|
||||
enabled = true,
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: [
|
||||
@@ -295,8 +296,9 @@ export function useTournamentCodes(
|
||||
`/communities/${communityId}/tournament-codes${queryString ? `?${queryString}` : ''}`,
|
||||
);
|
||||
},
|
||||
enabled: Boolean(communityId),
|
||||
refetchInterval: 30_000,
|
||||
enabled: Boolean(communityId && enabled),
|
||||
refetchInterval: enabled ? 30_000 : false,
|
||||
retry: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user