Made it so the timer is more dynamic
This commit is contained in:
@@ -87,6 +87,12 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
|
||||
|
||||
const [hasExamEnded, setHasExamEnded] = useExamStore((state) => [state.hasExamEnded, state.setHasExamEnded]);
|
||||
|
||||
useEffect(() => {
|
||||
if (hasExamEnded && exerciseIndex === -1) {
|
||||
setExerciseIndex((prev) => prev + 1);
|
||||
}
|
||||
}, [hasExamEnded, exerciseIndex]);
|
||||
|
||||
const confirmFinishModule = (keepGoing?: boolean) => {
|
||||
if (!keepGoing) {
|
||||
setShowBlankModal(false);
|
||||
|
||||
Reference in New Issue
Block a user