mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 13:19:05 +00:00
Igor/mathieu/frontend openapi react query (#597)
* small typing * typing fixes --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ const useWebRTC = (
|
||||
): Peer => {
|
||||
const [peer, setPeer] = useState<Peer | null>(null);
|
||||
const { setError } = useError();
|
||||
const webRTCMutation = useTranscriptWebRTC();
|
||||
const { mutateAsync: mutateWebRtcTranscriptAsync } = useTranscriptWebRTC();
|
||||
|
||||
useEffect(() => {
|
||||
if (!stream || !transcriptId) {
|
||||
@@ -41,7 +41,7 @@ const useWebRTC = (
|
||||
};
|
||||
|
||||
try {
|
||||
const answer = await webRTCMutation.mutateAsync({
|
||||
const answer = await mutateWebRtcTranscriptAsync({
|
||||
params: {
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
@@ -69,7 +69,7 @@ const useWebRTC = (
|
||||
return () => {
|
||||
p.destroy();
|
||||
};
|
||||
}, [stream, transcriptId, webRTCMutation]);
|
||||
}, [stream, transcriptId, mutateWebRtcTranscriptAsync]);
|
||||
|
||||
return peer;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user