diff --git a/src/frontend/src/modals/formModal/index.tsx b/src/frontend/src/modals/formModal/index.tsx index d0a73f941..e80bc6c35 100644 --- a/src/frontend/src/modals/formModal/index.tsx +++ b/src/frontend/src/modals/formModal/index.tsx @@ -292,7 +292,8 @@ export default function FormModal({ ws.current.close(); } }; - }, [connectWS]); + // do not add connectWS on dependencies array + }, []); useEffect(() => { if ( @@ -303,7 +304,8 @@ export default function FormModal({ connectWS(); setLockChat(false); } - }, [lockChat, connectWS]); + // do not add connectWS on dependencies array + }, [lockChat]); async function sendAll(data: sendAllProps) { try {