From ee49970db1a77321a28f771bc4c22cda94efef30 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 3 Nov 2023 11:46:13 +0100 Subject: [PATCH] fix reactivity --- www/app/[domain]/transcripts/useWebSockets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/app/[domain]/transcripts/useWebSockets.ts b/www/app/[domain]/transcripts/useWebSockets.ts index ddb6c576..b7c765ed 100644 --- a/www/app/[domain]/transcripts/useWebSockets.ts +++ b/www/app/[domain]/transcripts/useWebSockets.ts @@ -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 = () => {