diff --git a/ui/components/ChatWindow.tsx b/ui/components/ChatWindow.tsx index c45b2f9..e82d386 100644 --- a/ui/components/ChatWindow.tsx +++ b/ui/components/ChatWindow.tsx @@ -181,11 +181,11 @@ const useSocket = ( toast.error('WebSocket connection error.'); }; - ws.onclose = () => { - clearTimeout(timeoutId); - setError(true); - console.log('[DEBUG] closed'); - }; + // ws.onclose = () => { + // clearTimeout(timeoutId); + // setError(true); + // console.log('[DEBUG] closed'); + // }; ws.addEventListener('message', (e) => { const data = JSON.parse(e.data); @@ -529,16 +529,17 @@ const ChatWindow = ({ id }: { id?: string }) => { } // eslint-disable-next-line react-hooks/exhaustive-deps }, [messages]); + console.log(hasError); - if (hasError) { - return ( -
-

- Failed to connect to the server. Please try again later. -

-
- ); - } + // if (hasError) { + // return ( + //
+ //

+ // Failed to connect to the server. Please try again later. + //

+ //
+ // ); + // } return isReady ? ( notFound ? (