Просмотр исходного кода

通知气泡数量为未读消息数量

visuddhinanda 2 лет назад
Родитель
Сommit
c1fef2003c
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dashboard/src/components/notification/NotificationIcon.tsx

+ 2 - 2
dashboard/src/components/notification/NotificationIcon.tsx

@@ -40,8 +40,8 @@ const NotificationIconWidget = () => {
           "notification/updatedAt",
           now.getTime().toString()
         );
-        localStorage.setItem("notification/count", json.data.count.toString());
-        setCount(json.data.count);
+        localStorage.setItem("notification/count", json.data.unread.toString());
+        setCount(json.data.unread);
         if (json.data.count > 0) {
           const newMessageTime = json.data.rows[0].created_at;
           const lastTime = localStorage.getItem("notification/new");