Added abandon exam/exercise handler

This commit is contained in:
Joao Ramos
2023-08-16 19:32:39 +01:00
parent cd71cf4833
commit 78c5b7027e
2 changed files with 6 additions and 1 deletions

View File

@@ -334,7 +334,9 @@ export default function Page() {
abandonPopupDescription="Are you sure you want to leave the exercise? You will lose all your progress."
abandonConfirmButtonText="Confirm"
onAbandon={() => {
console.log('TODO: Handle Abandon');
setExam(undefined);
setSelectedModules([]);
setShowAbandonPopup(false)
return true;
}}
onCancel={() => setShowAbandonPopup(false)}