mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
fix reactivity
This commit is contained in:
@@ -27,7 +27,6 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { websocket_url } = useContext(DomainContext);
|
const { websocket_url } = useContext(DomainContext);
|
||||||
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isProcessing || textQueue.length === 0) {
|
if (isProcessing || textQueue.length === 0) {
|
||||||
@@ -153,6 +152,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
|
|
||||||
if (!transcriptId) return;
|
if (!transcriptId) return;
|
||||||
|
|
||||||
|
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
|
||||||
const ws = new WebSocket(url);
|
const ws = new WebSocket(url);
|
||||||
|
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user