diff --git a/app/routes/to.$identifier/teams.tsx b/app/routes/to.$identifier/teams.tsx index 0c94354e4..ad29d5ba4 100644 --- a/app/routes/to.$identifier/teams.tsx +++ b/app/routes/to.$identifier/teams.tsx @@ -15,6 +15,16 @@ export default function TournamentToolsTeamsPage() { return (
{data.teams.map((team) => { + const hasMapPool = () => { + // before start empty array is returned if team has map list + // after start empty array means team has no map list + if (data.event.isBeforeStart) { + return Boolean(team.mapPool); + } + + return team.mapPool && team.mapPool.length > 0; + }; + return (
@@ -25,7 +35,7 @@ export default function TournamentToolsTeamsPage() { height={16} width={16} /> - {team.mapPool && team.mapPool.length > 0 ? ( + {hasMapPool() ? ( ) : (