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

Commit2c53f7a

Browse files
feat: mark notification as read when action is clicked (#17095)
When a user clicks in a notification action we can infer thenotification was read.
1 parent33029c3 commit2c53f7a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎site/src/modules/notifications/NotificationsInbox/InboxItem.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ export const InboxItem: FC<InboxItemProps> = ({
4040
{notification.actions.map((action)=>{
4141
return(
4242
<Buttonvariant="outline"size="sm"key={action.label}asChild>
43-
<RouterLinkto={action.url}>{action.label}</RouterLink>
43+
<RouterLink
44+
to={action.url}
45+
onClick={()=>{
46+
onMarkNotificationAsRead(notification.id);
47+
}}
48+
>
49+
{action.label}
50+
</RouterLink>
4451
</Button>
4552
);
4653
})}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp