Added a filter that should not exist but whatever

This commit is contained in:
Tiago Ribeiro
2024-03-24 03:23:01 +00:00
parent ee26b50cf6
commit 445e486cd2

View File

@@ -71,7 +71,16 @@ export default function History({user}: {user: User}) {
useEffect(() => { useEffect(() => {
if (stats && !isStatsLoading) { if (stats && !isStatsLoading) {
setGroupedStats(groupByDate(stats)); setGroupedStats(
groupByDate(
stats.filter((x) => {
if (x.solutions.length === 0) return false;
if ((x.module === "writing" || x.module === "speaking") && !x.isDisabled && !x.solutions.every((y) => "evaluation" in y))
return false;
return true;
}),
),
);
} }
}, [stats, isStatsLoading]); }, [stats, isStatsLoading]);