mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-16 00:14:21 -05:00
Handle special case where tournament was started early
This commit is contained in:
parent
11f9e80b43
commit
58727249e4
|
|
@ -79,7 +79,11 @@ export const loader = async ({ params, request }: LoaderArgs) => {
|
|||
const hasStarted = hasTournamentStarted(tournamentId);
|
||||
let teams = findTeamsByTournamentId(tournamentId);
|
||||
if (hasStarted) {
|
||||
teams = teams.filter(teamHasCheckedIn);
|
||||
const checkedInTeams = teams.filter(teamHasCheckedIn);
|
||||
// handle special case where tournament was started early
|
||||
if (checkedInTeams.length > 0) {
|
||||
teams = checkedInTeams;
|
||||
}
|
||||
}
|
||||
|
||||
const teamMemberOfName = teams.find((team) =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user