Skip to content

Commit e88ef49

Browse files
committedMar 11, 2020
Prevent follow link when click in "Mark As Read" button
1 parent 0c047d8 commit e88ef49

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
 

‎dist/dev/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/prod/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/components/NotificationsPopup/NotificationList.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ const Item = ({ item, auth, onDismiss, markNotificationAsRead, isLink }) =>
6060
{
6161
!item.isRead &&
6262
(<div className={cn([styles.point, item.isSeen && styles['point-grey'], !item.isSeen && styles['point-red']])}
63-
onClick={() => {
64-
if (!isLink) {
65-
markNotificationAsRead(item, auth.tokenV3)
66-
}
63+
onClick={(e) => {
64+
e.preventDefault()
65+
e.stopPropagation()
66+
e.nativeEvent.stopImmediatePropagation()
67+
markNotificationAsRead(item, auth.tokenV3)
6768
}}
6869
/>)}
6970
</div>

0 commit comments

Comments
 (0)
Please sign in to comment.