This commit is contained in:
dahyeon committed 2026-04-27 14:24:43 -07:00
1 parent c00545f281
commit c5d296d403
2 files changed
+48 -2

No files matched your search

+4 -2
View File
@@ -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,
});
}