fix: stabilize competition results flow

This commit is contained in:
dahyeon committed 2026-07-13 13:55:08 +00:00
1 parent 3bd3120eb1
commit a88562b208
20 files changed
+411 -65

No files matched your search

+5 -2
View File
@@ -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,