From 932a2e4081552f0c1cde28f858289aa177a7185c Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Sun, 15 Oct 2023 23:23:46 +0100 Subject: [PATCH] Updated the look of the stats page --- src/pages/stats.tsx | 160 ++++++++++---------------------------------- 1 file changed, 36 insertions(+), 124 deletions(-) diff --git a/src/pages/stats.tsx b/src/pages/stats.tsx index 1ab77063..8b7fb90d 100644 --- a/src/pages/stats.tsx +++ b/src/pages/stats.tsx @@ -236,143 +236,55 @@ export default function Stats() {
{/* Exams per module */} -
+
Exams per Module
-
-
- - {totalExamsByModule(stats, "reading")} of{" "} - {Object.keys(groupBySession(stats)).length} - - Reading + {MODULE_ARRAY.map((module) => ( +
+
+ + {totalExamsByModule(stats, module)} of{" "} + {Object.keys(groupBySession(stats)).length} + + {capitalize(module)} +
+
- -
-
-
- - {totalExamsByModule(stats, "listening")} of{" "} - {Object.keys(groupBySession(stats)).length} - - Listening -
- -
-
-
- - {totalExamsByModule(stats, "writing")} of{" "} - {Object.keys(groupBySession(stats)).length} - - Writing -
- -
-
-
- - {totalExamsByModule(stats, "speaking")} of{" "} - {Object.keys(groupBySession(stats)).length} - - Speaking -
- -
+ ))}
{/* Module Score */} -
+
Module Score Bands
-
-
- - {user.levels.reading} of{" "} - {user.desiredLevels.reading} - - Reading + {MODULE_ARRAY.map((module) => ( +
+
+ + {user.levels[module]} of{" "} + {user.desiredLevels[module]} + + {capitalize(module)} +
+
- -
-
-
- - {user.levels.listening} of{" "} - {user.desiredLevels.listening} - - Listening -
- -
-
-
- - {user.levels.writing} of{" "} - {user.desiredLevels.writing} - - Writing -
- -
-
-
- - {user.levels.speaking} of{" "} - {user.desiredLevels.speaking} - - Speaking -
- -
+ ))}
{/* Total Score Band per Session */} -
+
Total Score Band per Session {/* Module Score Band per Session */} -
+
Module Score Band per Session