Skip to content

Commit

Permalink
Merge pull request #114 from rnjshippo/dev
Browse files Browse the repository at this point in the history
[fix] thread 두번 호출 제거
  • Loading branch information
rnjshippo authored Dec 14, 2020
2 parents 2bb6cb7 + d7ad94e commit fee90ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/components/ThreadListBox/ThreadListBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ const ThreadListBox = () => {
if (userInfo) {
dispatch(loadChannelRequest({ channelId: +channelId, userId: userInfo.id }));
}
dispatch(getThreadRequest({ channelId: Number(channelId) }));
}
}, [channelId, userInfo]);

useEffect(() => {
if (Number.isInteger(+channelId)) {
dispatch(getThreadRequest({ channelId: +channelId }));
}
}, [channelId]);

useEffect(() => {
if (current && socket) {
dispatch(enterRoomRequest({ room: current.name }));
Expand Down

0 comments on commit fee90ce

Please sign in to comment.