From 852bb27e81ff8287492a200ed934921f13786059 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 2 Sep 2023 01:35:24 +0800 Subject: [PATCH] Clear app badge when view Notifications page --- src/pages/notifications.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pages/notifications.jsx b/src/pages/notifications.jsx index 7e3edfbb..a71c34ed 100644 --- a/src/pages/notifications.jsx +++ b/src/pages/notifications.jsx @@ -194,6 +194,12 @@ function Notifications({ columnMode }) { const announcementsListRef = useRef(); + useLayoutEffect(() => { + if (navigator.clearAppBadge) { + navigator.clearAppBadge(); + } + }, []); + useEffect(() => { if (notificationID) { states.routeNotification = {