Urgent Fix for "Rules of Hooks" error

This commit is contained in:
Koper
2023-08-22 18:07:31 +07:00
parent c1298043fa
commit a91c453e41
2 changed files with 4 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ import useWebRTC from "../useWebRTC";
import useTranscript from "../useTranscript";
import { useWebSockets } from "../useWebSockets";
import "../../styles/button.css";
import getApi from "../../lib/getApi";
const App = () => {
const [stream, setStream] = useState<MediaStream | null>(null);
@@ -21,8 +22,9 @@ const App = () => {
}
}, []);
const api = getApi();
const transcript = useTranscript();
const webRTC = useWebRTC(stream, transcript.response?.id);
const webRTC = useWebRTC(stream, transcript.response?.id, api);
const webSockets = useWebSockets(transcript.response?.id);
return (