Updated the reading to a new format
This commit is contained in:
@@ -53,13 +53,22 @@ export default function Finish({user, scores, modules, isLoading, onViewResults}
|
||||
},
|
||||
};
|
||||
|
||||
const getTotalExercises = () => {
|
||||
const exam = exams.find((x) => x.module === selectedModule)!;
|
||||
if (exam.module === "reading") {
|
||||
return exam.parts.flatMap((x) => x.exercises).length;
|
||||
}
|
||||
|
||||
return exam.exercises.length;
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="w-full min-h-full h-fit flex flex-col items-center justify-between gap-8">
|
||||
<ModuleTitle
|
||||
module={selectedModule}
|
||||
totalExercises={exams.find((x) => x.module === selectedModule)!.exercises.length}
|
||||
exerciseIndex={exams.find((x) => x.module === selectedModule)!.exercises.length}
|
||||
totalExercises={getTotalExercises()}
|
||||
exerciseIndex={getTotalExercises()}
|
||||
minTimer={exams.find((x) => x.module === selectedModule)!.minTimer}
|
||||
disableTimer
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user