fix reactivity

This commit is contained in:
Sara
2023-11-03 11:46:13 +01:00
parent fc0ecaa3d5
commit ee49970db1

View File

@@ -27,7 +27,6 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
const router = useRouter();
const { websocket_url } = useContext(DomainContext);
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
useEffect(() => {
if (isProcessing || textQueue.length === 0) {
@@ -153,6 +152,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
if (!transcriptId) return;
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
const ws = new WebSocket(url);
ws.onopen = () => {