From 26b18b431ba6ad5b3e7bf5f1a1a38ea651930753 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:37:40 +0530 Subject: [PATCH] fix: total notifications count (#1579) --- apps/app/components/notifications/notification-popover.tsx | 2 +- apps/app/hooks/use-user-notifications.tsx | 2 +- apps/app/services/notifications.service.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/components/notifications/notification-popover.tsx b/apps/app/components/notifications/notification-popover.tsx index 45e5d7bc0..001669721 100644 --- a/apps/app/components/notifications/notification-popover.tsx +++ b/apps/app/components/notifications/notification-popover.tsx @@ -69,7 +69,7 @@ export const NotificationPopover = () => { { label: "Subscribed", value: "watching", - unreadCount: notificationCount?.watching_notifications, + unreadCount: notificationCount?.watching_issues, }, ]; diff --git a/apps/app/hooks/use-user-notifications.tsx b/apps/app/hooks/use-user-notifications.tsx index 3225e9639..b202a1deb 100644 --- a/apps/app/hooks/use-user-notifications.tsx +++ b/apps/app/hooks/use-user-notifications.tsx @@ -170,7 +170,7 @@ const useUserNotification = () => { setSelectedTab, totalNotificationCount: notificationCount ? notificationCount.created_issues + - notificationCount.watching_notifications + + notificationCount.watching_issues + notificationCount.my_issues : null, notificationCount, diff --git a/apps/app/services/notifications.service.ts b/apps/app/services/notifications.service.ts index f2b49b954..412b03988 100644 --- a/apps/app/services/notifications.service.ts +++ b/apps/app/services/notifications.service.ts @@ -159,7 +159,7 @@ class UserNotificationsServices extends APIService { async getUnreadNotificationsCount(workspaceSlug: string): Promise<{ created_issues: number; my_issues: number; - watching_notifications: number; + watching_issues: number; }> { return this.get(`/api/workspaces/${workspaceSlug}/users/notifications/unread/`) .then((response) => response?.data)