From b52e310b81b23571169bbb44e4412d63bd410a87 Mon Sep 17 00:00:00 2001 From: etienne Date: Thu, 8 Feb 2024 11:40:51 +0100 Subject: [PATCH] Commented out fetching messages in ChatBody component --- frontend/src/components/Chat/ChatBody.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Chat/ChatBody.tsx b/frontend/src/components/Chat/ChatBody.tsx index ea1f25c..b3dd320 100644 --- a/frontend/src/components/Chat/ChatBody.tsx +++ b/frontend/src/components/Chat/ChatBody.tsx @@ -32,12 +32,12 @@ function ChatBody({ roomId }: { roomId: string }) { }); }, []); - useEffect(() => { - fetch(`/messages/${roomId}/${socket?.id}`) - .then((response) => response.json()) - .then((data) => setMessages(data)) - .catch((error) => console.error("Error:", error)); - }, [roomId, socket?.id]); + // useEffect(() => { + // fetch(`/messages/${roomId}/${socket?.id}`) + // .then((response) => response.json()) + // .then((data) => setMessages(data)) + // .catch((error) => console.error("Error:", error)); + // }, [roomId, socket?.id]); return (