File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
package/src/components/Channel Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -877,18 +877,14 @@ const ChannelWithContext = <
877877 /**
878878 * Subscription to the Notification mark_read event.
879879 */
880- useEffect (
881- ( ) => {
882- const handleEvent : EventHandler < StreamChatGenerics > = ( event ) => {
883- if ( channel . cid === event . cid ) setRead ( channel ) ;
884- } ;
880+ useEffect ( ( ) => {
881+ const handleEvent : EventHandler < StreamChatGenerics > = ( event ) => {
882+ if ( channel . cid === event . cid ) setRead ( channel ) ;
883+ } ;
885884
886- const { unsubscribe } = client . on ( 'notification.mark_read' , handleEvent ) ;
887- return unsubscribe ;
888- } ,
889- // eslint-disable-next-line react-hooks/exhaustive-deps
890- [ channel , client , setRead ] ,
891- ) ;
885+ const { unsubscribe } = client . on ( 'notification.mark_read' , handleEvent ) ;
886+ return unsubscribe ;
887+ } , [ channel , client , setRead ] ) ;
892888
893889 const threadPropsExists = ! ! threadProps ;
894890
You can’t perform that action at this time.
0 commit comments