diff --git a/src/frontend/src/modals/chatModal/index.tsx b/src/frontend/src/modals/chatModal/index.tsx index 2f614c545..c06ac0e47 100644 --- a/src/frontend/src/modals/chatModal/index.tsx +++ b/src/frontend/src/modals/chatModal/index.tsx @@ -99,7 +99,7 @@ export default function ChatModal({ } // Do something with the data received from the WebSocket }; - newWs.onclose=(e)=>{console.log(e.reason)} + newWs.onclose=(e)=>{console.log(e.reason);setLockChat(false)} setWs(newWs); return () => { @@ -107,11 +107,6 @@ export default function ChatModal({ }; }, []); - useEffect(()=>{ - if(ws && ws.CLOSED){ - setLockChat(false) - } - },[lockChat]) async function sendAll(data: sendAllProps) { if (ws) {