mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
Urgent Fix for "Rules of Hooks" error
This commit is contained in:
@@ -5,11 +5,11 @@ import {
|
||||
V1TranscriptRecordWebrtcRequest,
|
||||
} from "../api/apis/DefaultApi";
|
||||
import { Configuration } from "../api/runtime";
|
||||
import getApi from "../lib/getApi";
|
||||
|
||||
const useWebRTC = (
|
||||
stream: MediaStream | null,
|
||||
transcriptId: string | null,
|
||||
api: DefaultApi,
|
||||
): Peer => {
|
||||
const [peer, setPeer] = useState<Peer | null>(null);
|
||||
|
||||
@@ -18,8 +18,6 @@ const useWebRTC = (
|
||||
return;
|
||||
}
|
||||
|
||||
const api = getApi();
|
||||
|
||||
let p: Peer = new Peer({ initiator: true, stream: stream });
|
||||
|
||||
p.on("signal", (data: any) => {
|
||||
|
||||
Reference in New Issue
Block a user