From f5ce3dd75eb48cd8ececd4a34aea8afc887271f8 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 2 Nov 2023 16:41:06 +0100 Subject: [PATCH] www: remove auth changes (will be done by sara PR) --- .../transcripts/[transcriptId]/record/page.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/www/app/[domain]/transcripts/[transcriptId]/record/page.tsx b/www/app/[domain]/transcripts/[transcriptId]/record/page.tsx index 51a318a4..8e31327c 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/record/page.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/record/page.tsx @@ -14,8 +14,6 @@ import DisconnectedIndicator from "../../disconnectedIndicator"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faGear } from "@fortawesome/free-solid-svg-icons"; import { lockWakeState, releaseWakeState } from "../../../../lib/wakeLock"; -import { featRequireLogin } from "../../../../../app/lib/utils"; -import { useFiefIsAuthenticated } from "@fief/fief/nextjs/react"; type TranscriptDetails = { params: { @@ -38,23 +36,16 @@ const TranscriptRecord = (details: TranscriptDetails) => { } }, []); - const isAuthenticated = useFiefIsAuthenticated(); const api = getApi(); - const [transcriptId, setTranscriptId] = useState(""); - const transcript = useTranscript(api, transcriptId); - const webRTC = useWebRTC(stream, transcriptId, api); - const webSockets = useWebSockets(transcriptId); + const transcript = useTranscript(api, details.params.transcriptId); + const webRTC = useWebRTC(stream, details.params.transcriptId, api); + const webSockets = useWebSockets(details.params.transcriptId); const { audioDevices, getAudioStream } = useAudioDevice(); const [hasRecorded, setHasRecorded] = useState(false); const [transcriptStarted, setTranscriptStarted] = useState(false); - useEffect(() => { - if (featRequireLogin() && !isAuthenticated) return; - setTranscriptId(details.params.transcriptId); - }, [api, details.params.transcriptId, isAuthenticated]); - useEffect(() => { if (!transcriptStarted && webSockets.transcriptText.length !== 0) setTranscriptStarted(true);