Merge pull request #102 from TheRealOwenRees/hotfix./fix-norms

Fix norms
This commit is contained in:
Owen Rees
2023-07-17 22:06:22 +02:00
committed by GitHub
+5 -2
View File
@@ -101,8 +101,11 @@ const TimeControlGroup = ({ timeControl, colour }: TimeControlGroupProps) => {
const expandedClusterMarkerRef = useRef<L.MarkerCluster | null>(null); const expandedClusterMarkerRef = useRef<L.MarkerCluster | null>(null);
const filteredTournaments = useMemo( const filteredTournaments = useMemo(
() => tournaments.filter((t) => t.timeControl === timeControl), () =>
[timeControl, tournaments], tournaments
.filter((t) => t.timeControl === timeControl)
.filter((t) => (normsOnly ? t.norm : true)),
[normsOnly, timeControl, tournaments],
); );
const hoveredListTournamentId = useAtomValue( const hoveredListTournamentId = useAtomValue(