Disable notifications (#1421)

* Remove notifications

* remove dead component
This commit is contained in:
Faustino Kialungila 2020-04-13 18:53:33 +02:00 committed by GitHub
parent 692ceece65
commit cca15b0640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 138 deletions

View file

@ -1,8 +1,6 @@
// This optional code is used to register a service worker.
// register() is not called by default.
import { push } from "./components/Toast";
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a page, after all the
@ -76,10 +74,11 @@ function registerValidSW(swUrl: string, config?: Config) {
// At this point, the updated precached content has been fetched,
// but the previous service worker will still serve the older
// content until all client tabs are closed.
push(
"New content is available and will be used when all " +
"tabs for this page are closed.",
);
// console.log(
// "New content is available and will be used when all " +
// "tabs for this page are closed.",
// );
// Execute callback
if (config && config.onUpdate) {
@ -89,7 +88,8 @@ function registerValidSW(swUrl: string, config?: Config) {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
push("Content is cached for offline use.");
// console.log("Content is cached for offline use.");
// Execute callback
if (config && config.onSuccess) {
@ -129,7 +129,9 @@ function checkValidServiceWorker(swUrl: string, config?: Config) {
}
})
.catch(() => {
push("No internet connection found. App is running in offline mode.");
// console.log(
// "No internet connection found. App is running in offline mode.",
// );
});
}