Fix the time control filters

This commit is contained in:
Timothy Armes
2024-12-03 11:50:52 +01:00
parent 3dfbde0ef9
commit 1b35b62f1e
+7 -8
View File
@@ -69,14 +69,13 @@ export const filteredTournamentsByTimeControlAndZoneAtom = atom((get) => {
return (
!isBefore(tournamentDate, startDate) &&
(endDate === undefined ||
(!isAfter(tournamentDate, endDate) &&
!tournament.pending &&
tournament.status === "scheduled" &&
((tournament.timeControl === TimeControl.Classic && classic) ||
(tournament.timeControl === TimeControl.Rapid && rapid) ||
(tournament.timeControl === TimeControl.Blitz && blitz) ||
(tournament.timeControl === TimeControl.Other && other))))
(endDate === undefined || !isAfter(tournamentDate, endDate)) &&
!tournament.pending &&
tournament.status === "scheduled" &&
((tournament.timeControl === TimeControl.Classic && classic) ||
(tournament.timeControl === TimeControl.Rapid && rapid) ||
(tournament.timeControl === TimeControl.Blitz && blitz) ||
(tournament.timeControl === TimeControl.Other && other))
);
});