♻️ (notification)
This commit is contained in:
@@ -7,10 +7,9 @@ if (process.env.NODE_ENV === 'production') {
|
||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||
ready(sw) {
|
||||
sw.getNotifications().then((notifs) => {
|
||||
const newVersions = notifs.filter(
|
||||
(notif) => notif.tag === 'new-version'
|
||||
)
|
||||
newVersions.forEach((notif) => notif.close())
|
||||
notifs
|
||||
.filter((notif) => notif.tag === 'new-version')
|
||||
.forEach((notif) => notif.close())
|
||||
})
|
||||
console.log('App is being served from cache by a service worker')
|
||||
setNotificationInstance((title, options?) =>
|
||||
|
||||
Reference in New Issue
Block a user