🐛 (notif)
This commit is contained in:
@@ -7,7 +7,9 @@ if (process.env.NODE_ENV === 'production') {
|
||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||
ready(sw) {
|
||||
console.log('App is being served from cache by a service worker')
|
||||
setNotificationInstance(sw.showNotification)
|
||||
setNotificationInstance((title, options?) =>
|
||||
sw.showNotification(title, options)
|
||||
)
|
||||
},
|
||||
registered() {
|
||||
console.log('Service worker has been registered.')
|
||||
@@ -20,7 +22,6 @@ if (process.env.NODE_ENV === 'production') {
|
||||
},
|
||||
updated() {
|
||||
console.log('New content is available; please refresh.')
|
||||
location.reload(true)
|
||||
},
|
||||
offline() {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user