Skip to content

Commit

Permalink
๐Ÿ› fix: useEffect ์˜์กด์„ฑ ๋ฐฐ์—ด ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
baegyeong committed Nov 21, 2024
1 parent 920c83d commit 9d292df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/frontend/src/pages/stock-detail/ChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export const ChatPanel = () => {

useEffect(() => {
const handleChat = (message: ChatDataResponse) => {
console.log('Received message:', message);
if (message?.chats) {
console.log('Chats:', message.chats);
setChatData(message.chats);
}
};
Expand All @@ -38,7 +36,7 @@ export const ChatPanel = () => {
socketChat.off('chat', handleChat);
};
}
}, [socketChat, isConnected]);
}, []);

return (
<article className="flex flex-col gap-5 rounded-md bg-white p-7">
Expand Down

0 comments on commit 9d292df

Please sign in to comment.