From cb3790dc1d79643bfdf1c791fdccabb3f13120a5 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Mon, 9 Oct 2023 11:06:26 +0100 Subject: [PATCH] Removed the DatePicker from the stats --- src/pages/stats.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pages/stats.tsx b/src/pages/stats.tsx index 23e0ffef..c806429f 100644 --- a/src/pages/stats.tsx +++ b/src/pages/stats.tsx @@ -60,16 +60,16 @@ export default function Stats() { if (user) setStatsUserId(user.id); }, [user]); - useEffect(() => { - if (stats && stats.length > 0) { - const sortedStats = stats.sort((a, b) => a.date - b.date); - const firstStat = sortedStats.shift()!; + // useEffect(() => { + // if (stats && stats.length > 0) { + // const sortedStats = stats.sort((a, b) => a.date - b.date); + // const firstStat = sortedStats.shift()!; - setStartDate(moment.unix(firstStat.date).toDate()); - console.log(stats.filter((x) => moment.unix(x.date).isAfter(startDate))); - console.log(stats.filter((x) => moment.unix(x.date).isBefore(endDate))); - } - }, [stats]); + // setStartDate(moment.unix(firstStat.date).toDate()); + // console.log(stats.filter((x) => moment.unix(x.date).isAfter(startDate))); + // console.log(stats.filter((x) => moment.unix(x.date).isBefore(endDate))); + // } + // }, [stats]); const calculateTotalScorePerSession = () => { const groupedBySession = groupBySession(stats); @@ -210,7 +210,7 @@ export default function Stats() { /> )} - + /> */}
{/* Exams per module */}