mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Replace 1h KO with a catch all category - display only when required
This commit is contained in:
+3
-3
@@ -12,7 +12,7 @@ export const searchStringAtom = atom('');
|
||||
export const classicAtom = atom(true);
|
||||
export const rapidAtom = atom(true);
|
||||
export const blitzAtom = atom(true);
|
||||
export const oneHourKOAtom = atom(true);
|
||||
export const otherAtom = atom(true);
|
||||
|
||||
export const {
|
||||
currentValueAtom: hoveredMapTournamentIdAtom,
|
||||
@@ -29,13 +29,13 @@ export const filteredTournamentsByTimeControlAtom = atom((get) => {
|
||||
const classic = get(classicAtom);
|
||||
const rapid = get(rapidAtom);
|
||||
const blitz = get(blitzAtom);
|
||||
const oneHourKO = get(oneHourKOAtom);
|
||||
const other = get(otherAtom);
|
||||
|
||||
return tournaments.filter(tournament =>
|
||||
(tournament.timeControl === TimeControl.Classic && classic) ||
|
||||
(tournament.timeControl === TimeControl.Rapid && rapid) ||
|
||||
(tournament.timeControl === TimeControl.Blitz && blitz) ||
|
||||
(tournament.timeControl === TimeControl.KO && oneHourKO));
|
||||
(tournament.timeControl === TimeControl.Other && other));
|
||||
});
|
||||
|
||||
export const filteredTournamentsListAtom = atom((get) => {
|
||||
|
||||
Reference in New Issue
Block a user