Skip to content

Commit

Permalink
Commented out fetching messages in ChatBody component
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne committed Feb 8, 2024
1 parent 244346d commit b52e310
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/components/Chat/ChatBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className="basis-[85%] overflow-y-scroll p-5 w-full flex flex-col gap-2">
Expand Down

0 comments on commit b52e310

Please sign in to comment.