MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / fetchNotifications

Function fetchNotifications

src/components/NotificationDropdown.tsx:57–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 const isMobile = useIsMobile();
56
57 const fetchNotifications = async () => {
58 try {
59 setLoading(true);
60 const res = await fetch("/api/notifications");
61 const data = await res.json();
62 setNotifications(data.notifications || []);
63 setUnreadCount(data.unreadCount || 0);
64 } catch (error) {
65 console.error("Failed to fetch notifications:", error);
66 } finally {
67 setLoading(false);
68 }
69 };
70
71 useEffect(() => {
72 fetchNotifications();

Callers 5

NotificationDropdownFunction · 0.85
markAsReadFunction · 0.85
markAllAsReadFunction · 0.85
deleteNotificationFunction · 0.85
clearReadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected