fix(exam): fix pretest screen start exam button

This commit is contained in:
shafin-r
2025-07-07 21:01:11 +06:00
parent 22eb8285ec
commit d42a42a8d1
10 changed files with 122 additions and 128 deletions

View File

@ -4,6 +4,7 @@ import Image from "next/image";
import { ChevronLeft, Layers } from "lucide-react";
import { useTimer } from "@/context/TimerContext";
import styles from "@/css/Header.module.css";
import { useExam } from "@/context/ExamContext";
const API_URL = "https://examjam-api.pptx704.com";
@ -26,6 +27,7 @@ const Header = ({
examDuration,
}) => {
const router = useRouter();
const { clearExam } = useExam();
const [totalSeconds, setTotalSeconds] = useState(
examDuration ? parseInt(examDuration) * 60 : 0
);
@ -86,6 +88,7 @@ const Header = ({
if (stopTimer) {
stopTimer();
}
clearExam();
router.push("/unit");
}
};