Skip to content

Commit 5eebbae

Browse files
committed
fix: tests and lint issues
1 parent d9e83fc commit 5eebbae

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -877,14 +877,18 @@ const ChannelWithContext = <
877877
/**
878878
* Subscription to the Notification mark_read event.
879879
*/
880-
useEffect(() => {
881-
const handleEvent: EventHandler<StreamChatGenerics> = (event) => {
882-
if (channel.cid === event.cid) setRead(channel);
883-
};
880+
useEffect(
881+
() => {
882+
const handleEvent: EventHandler<StreamChatGenerics> = (event) => {
883+
if (channel.cid === event.cid) setRead(channel);
884+
};
884885

885-
const { unsubscribe } = client.on('notification.mark_read', handleEvent);
886-
return unsubscribe;
887-
}, [channel.cid, client, copyChannelState]);
886+
const { unsubscribe } = client.on('notification.mark_read', handleEvent);
887+
return unsubscribe;
888+
},
889+
// eslint-disable-next-line react-hooks/exhaustive-deps
890+
[channel.cid, client, setRead],
891+
);
888892

889893
const threadPropsExists = !!threadProps;
890894

package/src/components/MessageList/UnreadMessagesNotification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const UnreadMessagesNotification = (props: UnreadMessagesNotificationProp
2727
theme: {
2828
colors: { text_low_emphasis, white_snow },
2929
messageList: {
30-
unreadMessagesNotification: { container, closeButtonContainer, closeIcon, text },
30+
unreadMessagesNotification: { closeButtonContainer, closeIcon, container, text },
3131
},
3232
},
3333
} = useTheme();

0 commit comments

Comments
 (0)