Updated the Record to start with the overall screen

This commit is contained in:
Tiago Ribeiro
2024-01-14 23:13:12 +00:00
parent e324b37942
commit 24ec336dca
3 changed files with 10 additions and 10 deletions

View File

@@ -30,7 +30,7 @@ interface Props {
export default function ExamPage({page}: Props) {
const [hasBeenUploaded, setHasBeenUploaded] = useState(false);
const [moduleIndex, setModuleIndex] = useState(0);
const [moduleIndex, setModuleIndex] = useState(-1);
const [sessionId, setSessionId] = useState("");
const [exam, setExam] = useState<Exam>();
const [isEvaluationLoading, setIsEvaluationLoading] = useState(false);
@@ -247,14 +247,15 @@ export default function ExamPage({page}: Props) {
user={user!}
disableSelection={page === "exams"}
onStart={(modules, avoid) => {
setSelectedModules(modules);
setModuleIndex(0);
setAvoidRepeated(avoid);
setSelectedModules(modules);
}}
/>
);
}
if (moduleIndex >= selectedModules.length) {
if (moduleIndex >= selectedModules.length || moduleIndex === -1) {
return (
<Finish
isLoading={isEvaluationLoading}