this repo has no description
0
fork

Configure Feed

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

Mentions also need fixNotifications

It's also from notifications API

+4 -1
+3
src/pages/mentions.jsx
··· 4 4 import Link from '../components/link'; 5 5 import Timeline from '../components/timeline'; 6 6 import { api } from '../utils/api'; 7 + import { fixNotifications } from '../utils/group-notifications'; 7 8 import { saveStatus } from '../utils/states'; 8 9 import useTitle from '../utils/useTitle'; 9 10 ··· 30 31 const results = await mentionsIterator.current.next(); 31 32 let { value } = results; 32 33 if (value?.length) { 34 + value = fixNotifications(value); 35 + 33 36 if (firstLoad) { 34 37 latestItem.current = value[0].id; 35 38 console.log('First load', latestItem.current);
+1 -1
src/utils/group-notifications.jsx
··· 9 9 poll: ['status'], 10 10 update: ['status'], 11 11 }; 12 - function fixNotifications(notifications) { 12 + export function fixNotifications(notifications) { 13 13 return notifications.filter((notification) => { 14 14 const { type, id, createdAt } = notification; 15 15 if (!type) {