From a54030ce8dea42e4b62e9ae7e878bd55d8570071 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 2 May 2026 11:46:46 +0300 Subject: [PATCH] Use correct team avatar --- .../components/TournamentMatchActionTab.tsx | 11 +++++++---- .../components/TournamentMatchTabs.tsx | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/features/tournament-match/components/TournamentMatchActionTab.tsx b/app/features/tournament-match/components/TournamentMatchActionTab.tsx index 57de5a3b1..713062bed 100644 --- a/app/features/tournament-match/components/TournamentMatchActionTab.tsx +++ b/app/features/tournament-match/components/TournamentMatchActionTab.tsx @@ -85,6 +85,7 @@ export function TournamentMatchActionTab({ setEndingTeamIds.length > 0 ? { ...buildSetEndingData({ + tournament, teams: [teamOne, teamTwo], scores, results: data.results, @@ -101,12 +102,12 @@ export function TournamentMatchActionTab({ { id: teamOne.id, name: teamOne.name, - avatar: teamOne.pickupAvatarUrl ?? undefined, + avatar: tournament.tournamentTeamLogoSrc(teamOne) ?? undefined, }, { id: teamTwo.id, name: teamTwo.name, - avatar: teamTwo.pickupAvatarUrl ?? undefined, + avatar: tournament.tournamentTeamLogoSrc(teamTwo) ?? undefined, }, ]} ownTeamId={ownTeamId} @@ -215,11 +216,13 @@ function useTournamentWeaponReport({ } function buildSetEndingData({ + tournament, teams, scores, results, opponentOneId, }: { + tournament: ReturnType; teams: [ NonNullable["teamById"]>>, NonNullable["teamById"]>>, @@ -303,11 +306,11 @@ function buildSetEndingData({ teams: { alpha: { name: teamOne.name, - avatar: teamOne.pickupAvatarUrl ?? undefined, + avatar: tournament.tournamentTeamLogoSrc(teamOne) ?? undefined, }, bravo: { name: teamTwo.name, - avatar: teamTwo.pickupAvatarUrl ?? undefined, + avatar: tournament.tournamentTeamLogoSrc(teamTwo) ?? undefined, }, }, score: { alpha: scores[0], bravo: scores[1] }, diff --git a/app/features/tournament-match/components/TournamentMatchTabs.tsx b/app/features/tournament-match/components/TournamentMatchTabs.tsx index c14665d1c..ad6cbcae7 100644 --- a/app/features/tournament-match/components/TournamentMatchTabs.tsx +++ b/app/features/tournament-match/components/TournamentMatchTabs.tsx @@ -108,15 +108,18 @@ function resolveTimelineTeams( const teamOne = tournament.teamById(opponentOneId); const teamTwo = tournament.teamById(opponentTwoId); - // xxx: is this correct? return { alpha: { name: teamOne?.name ?? "?", - avatar: teamOne?.pickupAvatarUrl ?? undefined, + avatar: teamOne + ? (tournament.tournamentTeamLogoSrc(teamOne) ?? undefined) + : undefined, }, bravo: { name: teamTwo?.name ?? "?", - avatar: teamTwo?.pickupAvatarUrl ?? undefined, + avatar: teamTwo + ? (tournament.tournamentTeamLogoSrc(teamTwo) ?? undefined) + : undefined, }, }; } @@ -402,7 +405,7 @@ function TournamentMatchRosterTab({ tournamentId: tournament.ctx.id, tournamentTeamId: team.id, }), - avatar: team.pickupAvatarUrl ?? undefined, + avatar: tournament.tournamentTeamLogoSrc(team) ?? undefined, }, members: team.members.map((m) => ({ id: m.userId,