MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / getUnreadKeys

Function getUnreadKeys

web/src/components/layout/HeaderBar.js:82–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 };
81
82 const getUnreadKeys = () => {
83 if (!announcements.length) return [];
84 let readKeys = [];
85 try {
86 readKeys = JSON.parse(localStorage.getItem('notice_read_keys')) || [];
87 } catch (_) {
88 readKeys = [];
89 }
90 const readSet = new Set(readKeys);
91 return announcements.filter((a) => !readSet.has(getAnnouncementKey(a))).map(getAnnouncementKey);
92 };
93
94 useEffect(() => {
95 setUnreadCount(calculateUnreadCount());

Callers

nothing calls this directly

Calls 1

getAnnouncementKeyFunction · 0.85

Tested by

no test coverage detected