Skip to content

Commit

Permalink
Chat.js useEffect 의존성 배열 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
alaneelee committed Jan 3, 2024
1 parent 2ec7c3d commit 8b7b23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const ChatComponent = ({ chattingRoomId }) => {
};

connectWebSocketAsync();
}, []);
}, [accessToken, chattingRoomIdString, fetchToken]);

const scrollToBottom = () => {
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
Expand Down

0 comments on commit 8b7b23a

Please sign in to comment.