Skip to content

Commit 2f41a99

Browse files
authored
Merge pull request #115 from boostcamp-2020/dev
Dev to master
2 parents 3819a5f + fee90ce commit 2f41a99

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/src/components/ThreadListBox/ThreadListBox.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@ const ThreadListBox = () => {
3838
if (userInfo) {
3939
dispatch(loadChannelRequest({ channelId: +channelId, userId: userInfo.id }));
4040
}
41-
dispatch(getThreadRequest({ channelId: Number(channelId) }));
4241
}
4342
}, [channelId, userInfo]);
4443

44+
useEffect(() => {
45+
if (Number.isInteger(+channelId)) {
46+
dispatch(getThreadRequest({ channelId: +channelId }));
47+
}
48+
}, [channelId]);
49+
4550
useEffect(() => {
4651
if (current && socket) {
4752
dispatch(enterRoomRequest({ room: current.name }));

0 commit comments

Comments
 (0)