fix: total notifications count (#1579)

This commit is contained in:
Aaryan Khandelwal 2023-07-19 20:37:40 +05:30 committed by GitHub
parent 1bae9289f5
commit 26b18b431b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ export const NotificationPopover = () => {
{
label: "Subscribed",
value: "watching",
unreadCount: notificationCount?.watching_notifications,
unreadCount: notificationCount?.watching_issues,
},
];

View File

@ -170,7 +170,7 @@ const useUserNotification = () => {
setSelectedTab,
totalNotificationCount: notificationCount
? notificationCount.created_issues +
notificationCount.watching_notifications +
notificationCount.watching_issues +
notificationCount.my_issues
: null,
notificationCount,

View File

@ -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)