chore: remove attempt at notifications

This commit is contained in:
Kyle Gill
2019-05-29 20:49:38 -06:00
parent 4a27d6fc5f
commit 477dc9e22c

View File

@@ -19,63 +19,3 @@ export const wrapRootElement = ({ element }) => {
</FirebaseContext.Provider>
)
}
export const onServiceWorkerUpdateFound = () => {
const showNotification = () => {
Notification.requestPermission(result => {
if (result === "granted") {
navigator.serviceWorker.ready.then(registration => {
registration.showNotification("Update", {
body: "New content is available!",
icon: "../images/sol-journal-logo.png",
vibrate: [200, 100, 200, 100, 200, 100, 400],
tag: "request",
actions: [
// you can customize these actions as you like
{
action: alert("update!"), // you should define this
title: "update",
},
{
action: alert("ignore"), // you should define this
title: "ignore",
},
],
})
})
}
})
}
showNotification()
}
export const onServiceWorkerInstalled = () => {
const showNotification = () => {
Notification.requestPermission(result => {
if (result === "granted") {
navigator.serviceWorker.ready.then(registration => {
registration.showNotification("Installed", {
body: "New content is available!",
icon: "../images/sol-journal-logo.png",
vibrate: [200, 100, 200, 100, 200, 100, 400],
tag: "request",
actions: [
// you can customize these actions as you like
{
action: alert("update!"), // you should define this
title: "update",
},
{
action: alert("ignore"), // you should define this
title: "ignore",
},
],
})
})
}
})
}
showNotification()
}