From 1b35b62f1ecc559d2f70c4a1f29dc312d4a6977a Mon Sep 17 00:00:00 2001 From: Timothy Armes Date: Tue, 3 Dec 2024 11:50:52 +0100 Subject: [PATCH] Fix the time control filters --- src/atoms.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/atoms.ts b/src/atoms.ts index bc5d26a..188c902 100644 --- a/src/atoms.ts +++ b/src/atoms.ts @@ -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)) ); });