We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3819a5f + fee90ce commit 2f41a99Copy full SHA for 2f41a99
client/src/components/ThreadListBox/ThreadListBox.tsx
@@ -38,10 +38,15 @@ const ThreadListBox = () => {
38
if (userInfo) {
39
dispatch(loadChannelRequest({ channelId: +channelId, userId: userInfo.id }));
40
}
41
- dispatch(getThreadRequest({ channelId: Number(channelId) }));
42
43
}, [channelId, userInfo]);
44
+ useEffect(() => {
45
+ if (Number.isInteger(+channelId)) {
46
+ dispatch(getThreadRequest({ channelId: +channelId }));
47
+ }
48
+ }, [channelId]);
49
+
50
useEffect(() => {
51
if (current && socket) {
52
dispatch(enterRoomRequest({ room: current.name }));
0 commit comments