small refactor

This commit is contained in:
Joao Correia
2025-02-20 12:12:00 +00:00
parent 4ac11df6ae
commit b388ee399f

View File

@@ -260,10 +260,7 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor
if (examModule && examId) {
const exam = await getExamById(examModule, examId.trim());
if (!exam) {
toast.error(
"Something went wrong while fetching exam!",
{ toastId: "invalid-exam-id" }
);
toast.error("Something went wrong while fetching exam!");
setViewExamIsLoading(false);
return;
}
@@ -272,13 +269,6 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor
payload: { exams: [exam], modules: [examModule] },
});
router.push("/exam");
} else {
toast.error(
"Something went wrong while fetching exam!",
{ toastId: "invalid-exam-id" }
);
setViewExamIsLoading(false);
return;
}
}