1
This commit is contained in:
@@ -27,11 +27,10 @@ const NotificationPopup: React.FC = () => {
|
||||
|
||||
const fetchNotifications = useCallback(async () => {
|
||||
try {
|
||||
const result = await getNotifications();
|
||||
const result = await getNotifications(1, 20, false);
|
||||
const data = result.items || [];
|
||||
const unread = data.filter((n: Notification) => !n.isRead);
|
||||
setNotifications(unread);
|
||||
if (unread.length > 0 && !visible) {
|
||||
setNotifications(data);
|
||||
if (data.length > 0 && !visible) {
|
||||
setVisible(true);
|
||||
setCurrentIndex(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user