kopia lustrzana https://github.com/cheeaun/phanpy
Fix getNotifications is not a function
rodzic
1c295c585b
commit
61f2132abd
|
@ -206,15 +206,17 @@ function Notifications({ columnMode }) {
|
|||
useEffect(() => {
|
||||
if (uiState === 'default') {
|
||||
(async () => {
|
||||
const registration = await getRegistration();
|
||||
if (registration) {
|
||||
const notifications = await registration.getNotifications();
|
||||
console.log('🔔 Push notifications', notifications);
|
||||
// Close all notifications?
|
||||
// notifications.forEach((notification) => {
|
||||
// notification.close();
|
||||
// });
|
||||
}
|
||||
try {
|
||||
const registration = await getRegistration();
|
||||
if (registration?.getNotifications) {
|
||||
const notifications = await registration.getNotifications();
|
||||
console.log('🔔 Push notifications', notifications);
|
||||
// Close all notifications?
|
||||
// notifications.forEach((notification) => {
|
||||
// notification.close();
|
||||
// });
|
||||
}
|
||||
} catch (e) {}
|
||||
})();
|
||||
}
|
||||
}, [uiState]);
|
||||
|
|
Ładowanie…
Reference in New Issue