Updated the InteractiveSpeaking to also work with the session persistence

This commit is contained in:
Tiago Ribeiro
2024-02-08 11:43:01 +00:00
parent 2a9e204041
commit b09fe79cb7
12 changed files with 166 additions and 68 deletions

View File

@@ -178,7 +178,10 @@ export default function History({user}: {user: User}) {
const {timeSpent, session} = dateStats[0];
const selectExam = () => {
const examPromises = uniqBy(dateStats, "exam").map((stat) => getExamById(stat.module, stat.exam));
const examPromises = uniqBy(dateStats, "exam").map((stat) => {
console.log({stat});
return getExamById(stat.module, stat.exam);
});
Promise.all(examPromises).then((exams) => {
if (exams.every((x) => !!x)) {