mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
Fix the time control filters
This commit is contained in:
+7
-8
@@ -59,14 +59,13 @@ export const filteredTournamentsByTimeControlAtom = atom((get) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
!isBefore(tournamentDate, startDate) &&
|
!isBefore(tournamentDate, startDate) &&
|
||||||
(endDate === undefined ||
|
(endDate === undefined || !isAfter(tournamentDate, endDate)) &&
|
||||||
(!isAfter(tournamentDate, endDate) &&
|
!tournament.pending &&
|
||||||
!tournament.pending &&
|
tournament.status === "scheduled" &&
|
||||||
tournament.status === "scheduled" &&
|
((tournament.timeControl === TimeControl.Classic && classic) ||
|
||||||
((tournament.timeControl === TimeControl.Classic && classic) ||
|
(tournament.timeControl === TimeControl.Rapid && rapid) ||
|
||||||
(tournament.timeControl === TimeControl.Rapid && rapid) ||
|
(tournament.timeControl === TimeControl.Blitz && blitz) ||
|
||||||
(tournament.timeControl === TimeControl.Blitz && blitz) ||
|
(tournament.timeControl === TimeControl.Other && other))
|
||||||
(tournament.timeControl === TimeControl.Other && other))))
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user