kopia lustrzana https://github.com/cheeaun/phanpy
Clear badge when onmount too
rodzic
d18db56032
commit
7a30cc4b12
|
@ -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');
|
||||||
|
|
Ładowanie…
Reference in New Issue