From 477dc9e22c39e2759c8a01680c3815a6e3d60e40 Mon Sep 17 00:00:00 2001 From: Kyle Gill Date: Wed, 29 May 2019 20:49:38 -0600 Subject: [PATCH] chore: remove attempt at notifications --- gatsby-browser.js | 60 ----------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/gatsby-browser.js b/gatsby-browser.js index ddce947..68d5438 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -19,63 +19,3 @@ export const wrapRootElement = ({ element }) => { ) } - -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() -}