소스 검색

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

visuddhinanda 2 년 전
부모
커밋
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");