From 445e486cd2ae6f890f171a2730405cb1794399cc Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Sun, 24 Mar 2024 03:23:01 +0000 Subject: [PATCH] Added a filter that should not exist but whatever --- src/pages/record.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pages/record.tsx b/src/pages/record.tsx index 80eba79f..74228915 100644 --- a/src/pages/record.tsx +++ b/src/pages/record.tsx @@ -71,7 +71,16 @@ export default function History({user}: {user: User}) { useEffect(() => { 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]);