fix(api): exam logic yet to be fixed

This commit is contained in:
shafin-r
2025-08-31 17:45:08 +06:00
parent b112a8fdac
commit 65e3338859
3 changed files with 16 additions and 17 deletions

View File

@ -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>