mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-29 04:38:55 +03:00
Fix getNotifications is not a function
This commit is contained in:
parent
1c295c585b
commit
61f2132abd
1 changed files with 11 additions and 9 deletions
|
@ -206,15 +206,17 @@ function Notifications({ columnMode }) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (uiState === 'default') {
|
if (uiState === 'default') {
|
||||||
(async () => {
|
(async () => {
|
||||||
const registration = await getRegistration();
|
try {
|
||||||
if (registration) {
|
const registration = await getRegistration();
|
||||||
const notifications = await registration.getNotifications();
|
if (registration?.getNotifications) {
|
||||||
console.log('🔔 Push notifications', notifications);
|
const notifications = await registration.getNotifications();
|
||||||
// Close all notifications?
|
console.log('🔔 Push notifications', notifications);
|
||||||
// notifications.forEach((notification) => {
|
// Close all notifications?
|
||||||
// notification.close();
|
// notifications.forEach((notification) => {
|
||||||
// });
|
// notification.close();
|
||||||
}
|
// });
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
}, [uiState]);
|
}, [uiState]);
|
||||||
|
|
Loading…
Reference in a new issue