- {timer && (
-
- {Math.floor(timer / 60) < 10 ? "0" : ""}
- {Math.floor(timer / 60)}:{timer % 60 < 10 ? "0" : ""}
- {timer % 60}
-
- )}
{renderAudioPlayer()}
{exerciseIndex > -1 &&
exerciseIndex < exam.exercises.length &&
diff --git a/src/exams/Reading.tsx b/src/exams/Reading.tsx
index 34721926..014a1262 100644
--- a/src/exams/Reading.tsx
+++ b/src/exams/Reading.tsx
@@ -76,18 +76,8 @@ function TextModal({isOpen, title, content, onClose}: {isOpen: boolean; title: s
export default function Reading({exam, showSolutions = false, onFinish}: Props) {
const [exerciseIndex, setExerciseIndex] = useState(-1);
const [showTextModal, setShowTextModal] = useState(false);
- const [timer, setTimer] = useState
();
const [userSolutions, setUserSolutions] = useState([]);
- useEffect(() => {
- setTimer(exam.minTimer * 60);
- const timerInterval = setInterval(() => setTimer((prev) => prev && prev - 1), 1000);
-
- return () => {
- clearInterval(timerInterval);
- };
- }, [exam.minTimer]);
-
const nextExercise = (solution?: UserSolution) => {
if (solution) {
setUserSolutions((prev) => [...prev.filter((x) => x.id !== solution.id), solution]);
@@ -131,13 +121,6 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
<>
setShowTextModal(false)} />
- {timer && (
-
- {Math.floor(timer / 60) < 10 ? "0" : ""}
- {Math.floor(timer / 60)}:{timer % 60 < 10 ? "0" : ""}
- {timer % 60}
-
- )}
{exerciseIndex === -1 && renderText()}
{exerciseIndex > -1 &&
exerciseIndex < exam.exercises.length &&
diff --git a/src/exams/Selection.tsx b/src/exams/Selection.tsx
index 5b8389db..0104eda8 100644
--- a/src/exams/Selection.tsx
+++ b/src/exams/Selection.tsx
@@ -26,10 +26,10 @@ export default function Selection({user, onStart}: Props) {
return (
<>
-
+
-
-
+
+
-
+