generated from muhtadeetaron/nextjs-template
fix(api): exam logic yet to be fixed
This commit is contained in:
@ -16,7 +16,7 @@ export default function ExamPage() {
|
||||
const test_id = searchParams.get("test_id") || "";
|
||||
const type = searchParams.get("type") || "";
|
||||
|
||||
const { isOpen, close, open } = useModal();
|
||||
// const { isOpen, close, open } = useModal();
|
||||
const { timeRemaining, setInitialTime, stopTimer } = useTimer();
|
||||
const { test, answers, startExam, setAnswer, submitExam, cancelExam } =
|
||||
useExam();
|
||||
@ -36,7 +36,7 @@ export default function ExamPage() {
|
||||
if (window.confirm("Are you sure you want to quit the exam?")) {
|
||||
stopTimer();
|
||||
cancelExam();
|
||||
router.push("/unit");
|
||||
router.push(`/categories/${type}s`);
|
||||
}
|
||||
}, [stopTimer, cancelExam, router]);
|
||||
|
||||
@ -142,12 +142,6 @@ export default function ExamPage() {
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
<button
|
||||
onClick={showExitDialog}
|
||||
className="flex-1 bg-gray-200 text-gray-900 p-6 font-bold text-lg hover:bg-gray-300 transition-colors"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</BackgroundWrapper>
|
||||
|
||||
Reference in New Issue
Block a user