Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0cd254f

Browse files
feat: enable mark all inbox notifications as read (#17023)
Bind the "Mark all notifications as read" action to the correct APIrequest in the UI.
1 parent8d5e6f3 commit0cd254f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎site/src/api/api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,6 +2452,10 @@ class ApiMethods {
24522452
);
24532453
returnres.data;
24542454
};
2455+
2456+
markAllInboxNotificationsAsRead=async()=>{
2457+
awaitthis.axios.put<void>("/api/v2/notifications/inbox/mark-all-as-read");
2458+
};
24552459
}
24562460

24572461
// This is a hard coded CSRF token/cookie pair for local development. In prod,

‎site/src/modules/dashboard/Navbar/NavbarView.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
6969

7070
<NotificationsInbox
7171
fetchNotifications={API.getInboxNotifications}
72-
markAllAsRead={()=>{
73-
thrownewError("Function not implemented.");
74-
}}
72+
markAllAsRead={API.markAllInboxNotificationsAsRead}
7573
markNotificationAsRead={(notificationId)=>
7674
API.updateInboxNotificationReadStatus(notificationId,{
7775
is_read:true,
@@ -92,9 +90,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
9290
<divclassName="ml-auto flex items-center gap-3 md:hidden">
9391
<NotificationsInbox
9492
fetchNotifications={API.getInboxNotifications}
95-
markAllAsRead={()=>{
96-
thrownewError("Function not implemented.");
97-
}}
93+
markAllAsRead={API.markAllInboxNotificationsAsRead}
9894
markNotificationAsRead={(notificationId)=>
9995
API.updateInboxNotificationReadStatus(notificationId,{
10096
is_read:true,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp