fix: stabilize competition results flow
This commit is contained in:
1 parent
3bd3120eb1
commit
a88562b208
20 files changed
+411
-65
No files matched your search
@@ -257,12 +257,15 @@ export function useCompetition(
|
||||
export function useTeamCompetition(
|
||||
matchId: string | undefined,
|
||||
communityId = DEFAULT_COMMUNITY_ID,
|
||||
teamId?: string,
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: ['competition-team', communityId, matchId ?? null],
|
||||
queryKey: ['competition-team', communityId, matchId ?? null, teamId ?? null],
|
||||
queryFn: () =>
|
||||
apiFetch<TeamCompetitionViewResponse>(
|
||||
`/communities/${communityId}/matches/${matchId}/competition/team`,
|
||||
`/communities/${communityId}/matches/${matchId}/competition/team${
|
||||
teamId ? `?teamId=${encodeURIComponent(teamId)}` : ''
|
||||
}`,
|
||||
),
|
||||
enabled: Boolean(communityId && matchId),
|
||||
retry: false,
|
||||
|
||||
Reference in new issue
Block a user