From 84921b419f3bb52ea626b978a91713b87f0a4c32 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Thu, 23 Feb 2023 18:22:41 -0300 Subject: [PATCH] fixed message --- space_flow/src/components/chatComponent/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/space_flow/src/components/chatComponent/index.tsx b/space_flow/src/components/chatComponent/index.tsx index 99bebdd75..c2b43d280 100644 --- a/space_flow/src/components/chatComponent/index.tsx +++ b/space_flow/src/components/chatComponent/index.tsx @@ -18,13 +18,11 @@ export default function Chat({ reactFlowInstance }) { const [chatHistory, setChatHistory] = useState([]); const {setErrorData} = useContext(alertContext); const addChatHistory = (message, isSend) => { - console.log(message); setChatHistory((old) => { let newChat = _.cloneDeep(old); newChat.push({ message, isSend }); return newChat; }); - console.log(chatHistory); }; useEffect(()=>{ ref.current.scrollIntoView({behavior: 'smooth'}); @@ -80,7 +78,7 @@ export default function Chat({ reactFlowInstance }) { ) : (
-
+
{c.message}
@@ -111,7 +109,6 @@ export default function Chat({ reactFlowInstance }) { setChatValue(""); addChatHistory(message, true); sendAll({...reactFlowInstance.toObject(),message}).then((r) => {addChatHistory(r.data.result, false);}); - addChatHistory('teste', false); } else { setErrorData({title: 'Error sending message', list:['Chat nodes are missing.']}) }