mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
www: remove auth changes (will be done by sara PR)
This commit is contained in:
@@ -14,8 +14,6 @@ import DisconnectedIndicator from "../../disconnectedIndicator";
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faGear } from "@fortawesome/free-solid-svg-icons";
|
import { faGear } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { lockWakeState, releaseWakeState } from "../../../../lib/wakeLock";
|
import { lockWakeState, releaseWakeState } from "../../../../lib/wakeLock";
|
||||||
import { featRequireLogin } from "../../../../../app/lib/utils";
|
|
||||||
import { useFiefIsAuthenticated } from "@fief/fief/nextjs/react";
|
|
||||||
|
|
||||||
type TranscriptDetails = {
|
type TranscriptDetails = {
|
||||||
params: {
|
params: {
|
||||||
@@ -38,23 +36,16 @@ const TranscriptRecord = (details: TranscriptDetails) => {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const isAuthenticated = useFiefIsAuthenticated();
|
|
||||||
const api = getApi();
|
const api = getApi();
|
||||||
const [transcriptId, setTranscriptId] = useState<string>("");
|
const transcript = useTranscript(api, details.params.transcriptId);
|
||||||
const transcript = useTranscript(api, transcriptId);
|
const webRTC = useWebRTC(stream, details.params.transcriptId, api);
|
||||||
const webRTC = useWebRTC(stream, transcriptId, api);
|
const webSockets = useWebSockets(details.params.transcriptId);
|
||||||
const webSockets = useWebSockets(transcriptId);
|
|
||||||
|
|
||||||
const { audioDevices, getAudioStream } = useAudioDevice();
|
const { audioDevices, getAudioStream } = useAudioDevice();
|
||||||
|
|
||||||
const [hasRecorded, setHasRecorded] = useState(false);
|
const [hasRecorded, setHasRecorded] = useState(false);
|
||||||
const [transcriptStarted, setTranscriptStarted] = useState(false);
|
const [transcriptStarted, setTranscriptStarted] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (featRequireLogin() && !isAuthenticated) return;
|
|
||||||
setTranscriptId(details.params.transcriptId);
|
|
||||||
}, [api, details.params.transcriptId, isAuthenticated]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!transcriptStarted && webSockets.transcriptText.length !== 0)
|
if (!transcriptStarted && webSockets.transcriptText.length !== 0)
|
||||||
setTranscriptStarted(true);
|
setTranscriptStarted(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user