We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97cc5f2 commit 676426bCopy full SHA for 676426b
2 files changed
src/common/utils/SocketProvider/index.tsx
@@ -20,7 +20,7 @@ const SocketProvider = ({ children }: Props) => {
20
console.log('앱 시작 시 WebSocket 연결 완료');
21
unsubscribe = subChatListSocket(data => {
22
queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.CHAT_LIST] });
23
- setUnreadChatCount(data.message.unreadChatCount);
+ if (data.type === 'UNREAD_CHAT_COUNT') setUnreadChatCount(data.message.unreadChatCount);
24
});
25
})
26
.catch(err => {
src/features/chatList/types.ts
@@ -15,6 +15,6 @@ export interface ChatListInterface {
15
}
16
17
export interface SubChatListInterface {
18
- type: 'CHAT';
+ type: 'CHAT' | 'UNREAD_CHAT_COUNT';
19
message: ChatListInterface;
0 commit comments