mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Disable notifications (#1421)
* Remove notifications * remove dead component
This commit is contained in:
parent
692ceece65
commit
cca15b0640
3 changed files with 10 additions and 138 deletions
|
@ -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.",
|
||||
// );
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue