+
+
-
-
-
-
-
-
-
- {totalExams(stats)}
- Exams
-
-
-
-
-
-
-
- {stats.length}
- Exercises
-
-
-
-
-
-
-
- {averageScore(stats)}%
- Average Score
-
-
+
+ {totalExams(stats)}
+ Exams
-
-
- Bio
-
- Patricia Smith is a dedicated and enthusiastic student. Her passion for knowledge drives her to constantly seek
- new academic challenges. She is recognized for her exemplary work ethic, active participation in the classroom,
- and commitment to helping her peers. Her insatiable curiosity has led her to explore a wide range of areas of
- study, making her a versatile and adaptable learner. Patricia is a true academic leader, inspiring other students
- to pursue their own educational goals.
-
-
-
- Score History
-
-
-
-
-
-
-
- Reading
-
- Level {user.levels.reading} / Level {user.desiredLevels.reading}
-
-
-
-
+
+
+
-
-
-
-
-
-
- Writing
-
- Level {user.levels.writing} / Level {user.desiredLevels.writing}
-
-
-
-
-
-
-
-
-
-
-
- Listening
-
- Level {user.levels.listening} / Level {user.desiredLevels.listening}
-
-
-
-
-
-
-
-
-
-
-
- Speaking
-
- Level {user.levels.speaking} / Level {user.desiredLevels.speaking}
-
-
-
-
+
+ {stats.length}
+ Exercises
-
+
+
+
+
+
+ {averageScore(stats)}%
+ Average Score
+
+
+
-
-
+
+
+ Bio
+
+ Patricia Smith is a dedicated and enthusiastic student. Her passion for knowledge drives her to constantly seek new
+ academic challenges. She is recognized for her exemplary work ethic, active participation in the classroom, and commitment
+ to helping her peers. Her insatiable curiosity has led her to explore a wide range of areas of study, making her a
+ versatile and adaptable learner. Patricia is a true academic leader, inspiring other students to pursue their own
+ educational goals.
+
+
+
+ Score History
+
+
+
+
+
+
+
+ Reading
+
+ Level {user.levels.reading} / Level {user.desiredLevels.reading}
+
+
+
+
+
+
+
+
+
+
+
+ Writing
+
+ Level {user.levels.writing} / Level {user.desiredLevels.writing}
+
+
+
+
+
+
+
+
+
+
+
+ Listening
+
+ Level {user.levels.listening} / Level {user.desiredLevels.listening}
+
+
+
+
+
+
+
+
+
+
+
+ Speaking
+
+ Level {user.levels.speaking} / Level {user.desiredLevels.speaking}
+
+
+
+
+
+
+
+
)}
>
);
diff --git a/src/pages/test.tsx b/src/pages/test.tsx
index cda40997..bce36bfc 100644
--- a/src/pages/test.tsx
+++ b/src/pages/test.tsx
@@ -10,6 +10,7 @@ import Sidebar from "@/components/Sidebar";
import dynamic from "next/dynamic";
import {BsCheckCircleFill, BsMicFill, BsPauseCircle, BsPauseFill, BsPlayCircle, BsPlayFill, BsTrashFill} from "react-icons/bs";
import {useEffect, useState} from "react";
+import Layout from "@/components/High/Layout";
const Waveform = dynamic(() => import("../components/Waveform"), {ssr: false});
const ReactMediaRecorder = dynamic(() => import("react-media-recorder").then((mod) => mod.ReactMediaRecorder), {
@@ -67,128 +68,122 @@ export default function Page() {
{user && (
-
-
-
-
-
-
setMediaBlob(blob)}
- render={({status, startRecording, stopRecording, pauseRecording, resumeRecording, clearBlobUrl, mediaBlobUrl}) => (
-
-
Record your answer:
-
+
+ setMediaBlob(blob)}
+ render={({status, startRecording, stopRecording, pauseRecording, resumeRecording, clearBlobUrl, mediaBlobUrl}) => (
+
+
Record your answer:
+
+ {status === "idle" && (
+ <>
+
{status === "idle" && (
- <>
-
- {status === "idle" && (
-
{
- setRecordingDuration(0);
- startRecording();
- setIsRecording(true);
- }}
- className="h-5 w-5 text-mti-gray-cool cursor-pointer"
- />
- )}
- >
+ {
+ setRecordingDuration(0);
+ startRecording();
+ setIsRecording(true);
+ }}
+ className="h-5 w-5 text-mti-gray-cool cursor-pointer"
+ />
)}
- {status === "recording" && (
- <>
-
-
- {Math.round(recordingDuration / 60)
- .toString(10)
- .padStart(2, "0")}
- :
- {Math.round(recordingDuration % 60)
- .toString(10)
- .padStart(2, "0")}
-
-
-
-
- {
- setIsRecording(false);
- pauseRecording();
- }}
- className="text-red-500 w-8 h-8 cursor-pointer"
- />
- {
- setIsRecording(false);
- stopRecording();
- }}
- className="text-mti-green-light w-8 h-8 cursor-pointer"
- />
-
- >
- )}
- {status === "paused" && (
- <>
-
-
- {Math.round(recordingDuration / 60)
- .toString(10)
- .padStart(2, "0")}
- :
- {Math.round(recordingDuration % 60)
- .toString(10)
- .padStart(2, "0")}
-
-
-
-
- {
- setIsRecording(true);
- resumeRecording();
- }}
- className="text-mti-green-light w-8 h-8 cursor-pointer"
- />
- {
- setIsRecording(false);
- stopRecording();
- }}
- className="text-mti-green-light w-8 h-8 cursor-pointer"
- />
-
- >
- )}
- {status === "stopped" && mediaBlobUrl && (
- <>
-
-
-
{
- setRecordingDuration(0);
- clearBlobUrl();
- }}
- />
+ >
+ )}
+ {status === "recording" && (
+ <>
+
+
+ {Math.round(recordingDuration / 60)
+ .toString(10)
+ .padStart(2, "0")}
+ :
+ {Math.round(recordingDuration % 60)
+ .toString(10)
+ .padStart(2, "0")}
+
+
+
+
+ {
+ setIsRecording(false);
+ pauseRecording();
+ }}
+ className="text-red-500 w-8 h-8 cursor-pointer"
+ />
+ {
+ setIsRecording(false);
+ stopRecording();
+ }}
+ className="text-mti-green-light w-8 h-8 cursor-pointer"
+ />
+
+ >
+ )}
+ {status === "paused" && (
+ <>
+
+
+ {Math.round(recordingDuration / 60)
+ .toString(10)
+ .padStart(2, "0")}
+ :
+ {Math.round(recordingDuration % 60)
+ .toString(10)
+ .padStart(2, "0")}
+
+
+
+
+ {
+ setIsRecording(true);
+ resumeRecording();
+ }}
+ className="text-mti-green-light w-8 h-8 cursor-pointer"
+ />
+ {
+ setIsRecording(false);
+ stopRecording();
+ }}
+ className="text-mti-green-light w-8 h-8 cursor-pointer"
+ />
+
+ >
+ )}
+ {status === "stopped" && mediaBlobUrl && (
+ <>
+
+
+ {
+ setRecordingDuration(0);
+ clearBlobUrl();
+ }}
+ />
- {
- clearBlobUrl();
- setRecordingDuration(0);
- startRecording();
- setIsRecording(true);
- }}
- className="h-5 w-5 text-mti-gray-cool cursor-pointer"
- />
-
- >
- )}
-
-
- )}
- />
-
-
-
+
{
+ clearBlobUrl();
+ setRecordingDuration(0);
+ startRecording();
+ setIsRecording(true);
+ }}
+ className="h-5 w-5 text-mti-gray-cool cursor-pointer"
+ />
+
+ >
+ )}
+
+
+ )}
+ />
+
)}
>
);