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:
Igor Monadical
2025-09-02 11:49:00 -04:00
committed by GitHub
parent 0df1b224f2
commit ca75a4c95e
14 changed files with 67 additions and 74 deletions

View File

@@ -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;
};