fix team avatars

This commit is contained in:
yohlo
2026-03-01 20:10:06 -06:00
parent f0d8297f34
commit 1ce8a6a982
6 changed files with 7 additions and 16 deletions

View File

@@ -30,17 +30,7 @@ const TeamAvatar = ({
const hasNoLogo = !team.logo;
const hasTwoPlayers = team.players?.length === 2;
let shouldShowPlayerAvatars = false;
if (isRegional !== undefined) {
shouldShowPlayerAvatars = isRegional && hasTwoPlayers && hasNoLogo;
} else {
const tournaments = (team as any).tournaments;
const hasTournaments = tournaments && tournaments.length > 0;
const allTournamentsAreRegional = hasTournaments && tournaments.every((t: any) => t.regional === true);
shouldShowPlayerAvatars = hasTwoPlayers && hasNoLogo && (allTournamentsAreRegional || !hasTournaments);
}
const shouldShowPlayerAvatars = isRegional === true && hasTwoPlayers && hasNoLogo;
if (shouldShowPlayerAvatars && team.players?.length === 2) {
const playerSize = size * 0.6;