Don't load streams for tournament if before start

This commit is contained in:
Kalle 2023-05-23 23:16:19 +03:00
parent ef5c906321
commit 48f9f76259

View File

@ -95,7 +95,9 @@ export const loader = async ({ params, request }: LoaderArgs) => {
teams: censorMapPools(teams),
mapListGeneratorAvailable,
hasStarted,
streamsCount: (await streamsByTournamentId(tournamentId)).length,
streamsCount: hasStarted
? (await streamsByTournamentId(tournamentId)).length
: 0,
};
function censorMapPools(