diff --git a/src/routes/chat/ChannelList/NavItem.js b/src/routes/chat/ChannelList/NavItem.js index ac28062c..01ca921e 100644 --- a/src/routes/chat/ChannelList/NavItem.js +++ b/src/routes/chat/ChannelList/NavItem.js @@ -35,8 +35,10 @@ const NavItem = ({ id, setFiles, toggleRemoveConfirm }) => { readIndex, muted, loginUid, + loginUser, } = useSelector((store) => { return { + loginUser: store.contacts.byId[store.authData.uid], channel: store.channels.byId[id], mids: store.channelMessage[id], messageData: store.message, @@ -90,7 +92,7 @@ const NavItem = ({ id, setFiles, toggleRemoveConfirm }) => { muteChannel(data); }; const { is_public, name } = channel; - const { unreads, mentions = [] } = getUnreadCount({ + const { unreads = 0, mentions = [] } = getUnreadCount({ mids, messageData, readIndex, @@ -152,13 +154,15 @@ const NavItem = ({ id, setFiles, toggleRemoveConfirm }) => { {name}