Clear badge when onmount too

pull/228/head
Lim Chee Aun 2023-09-14 22:31:16 +08:00
rodzic d18db56032
commit 7a30cc4b12
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -106,6 +106,11 @@ export default memo(function NotificationService() {
}; };
}, []); }, []);
useLayoutEffect(() => {
if (navigator?.clearAppBadge) {
navigator.clearAppBadge();
}
}, []);
usePageVisibility((visible) => { usePageVisibility((visible) => {
if (visible && navigator?.clearAppBadge) { if (visible && navigator?.clearAppBadge) {
console.log('🔰 Clear app badge'); console.log('🔰 Clear app badge');