Improved an error we had before

This commit is contained in:
Tiago Ribeiro
2023-09-25 14:57:14 +01:00
parent cb5434d166
commit 8b7e7cf0ad
4 changed files with 3 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ export default function Page() {
const updateExamWithUserSolutions = (exam: Exam): Exam => {
const exercises = exam.exercises.map((x) => Object.assign(x, {userSolutions: userSolutions.find((y) => x.id === y.exercise)?.solutions}));
return Object.assign(exam, exercises);
return Object.assign(exam, {exercises});
};
const onFinish = (solutions: UserSolution[]) => {
@@ -291,6 +291,7 @@ export default function Page() {
abandonPopupDescription="Are you sure you want to leave the exercise? You will lose all your progress."
abandonConfirmButtonText="Confirm"
onAbandon={() => {
alert("HERE");
reset();
setShowAbandonPopup(false);
}}