fix team avatars
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user