UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

12 lines 532 B
import { useReplykeSelector } from "../../store/hooks"; import { selectTotalUnreadCount } from "../../store/slices/chatSlice"; /** * Returns the total number of unread messages across all conversations. * Initialized from the server on ChatProvider mount — accurate before the * conversation list is ever loaded. Kept in sync via socket events. */ function useTotalUnreadCount() { return useReplykeSelector(selectTotalUnreadCount) ?? 0; } export default useTotalUnreadCount; //# sourceMappingURL=useTotalUnreadCount.js.map