Updated the selection page

This commit is contained in:
Tiago Ribeiro
2023-06-14 22:22:18 +01:00
parent 9cf4bf7184
commit ec3157870e
2 changed files with 26 additions and 35 deletions

View File

@@ -39,6 +39,7 @@ export default function Page() {
const {user} = useUser({redirectTo: "/login"});
const [recordingDuration, setRecordingDuration] = useState(0);
const [isRecording, setIsRecording] = useState(false);
const [mediaBlob, setMediaBlob] = useState<string>();
useEffect(() => {
let recordingInterval: NodeJS.Timer | undefined = undefined;
@@ -73,6 +74,7 @@ export default function Page() {
<div className="w-5/6 h-full mr-8 bg-white shadow-md rounded-2xl p-12 flex flex-col gap-12">
<ReactMediaRecorder
audio
onStop={(blob) => setMediaBlob(blob)}
render={({status, startRecording, stopRecording, pauseRecording, resumeRecording, clearBlobUrl, mediaBlobUrl}) => (
<div className="w-full p-4 px-8 bg-transparent border-2 border-mti-gray-platinum rounded-2xl flex-col gap-8 items-center">
<p className="text-base font-normal">Record your answer:</p>