this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make announcements appear faster

+6 -4
+6 -4
src/pages/notifications.jsx
··· 103 103 setUIState('loading'); 104 104 (async () => { 105 105 try { 106 + const fetchNotificationsPromise = fetchNotifications(firstLoad); 106 107 const fetchFollowRequestsPromise = fetchFollowRequests(); 107 108 const fetchAnnouncementsPromise = fetchAnnouncements(); 108 - const { done } = await fetchNotifications(firstLoad); 109 - setShowMore(!done); 110 109 111 110 if (firstLoad) { 112 - const requests = await fetchFollowRequestsPromise; 113 - setFollowRequests(requests); 114 111 const announcements = await fetchAnnouncementsPromise; 115 112 announcements.sort((a, b) => { 116 113 // Sort by updatedAt first, then createdAt ··· 119 116 return bDate - aDate; 120 117 }); 121 118 setAnnouncements(announcements); 119 + const requests = await fetchFollowRequestsPromise; 120 + setFollowRequests(requests); 122 121 } 122 + 123 + const { done } = await fetchNotificationsPromise; 124 + setShowMore(!done); 123 125 124 126 setUIState('default'); 125 127 } catch (e) {