move serviceworker registration to separate module
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -47,28 +47,11 @@
|
||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||
import UserDetail from "./components/UserDetail.svelte";
|
||||
OpenAPI.BASE = config.baseurl;
|
||||
import { register as registerSW } from "./swmodule";
|
||||
store.init();
|
||||
|
||||
if ("serviceWorker" in navigator) {
|
||||
window.addEventListener("load", () => {
|
||||
navigator.serviceWorker.register("/sw.js").then(
|
||||
(registration) => {
|
||||
// console.log(`sw successful with scope: ${registration.scope}`);
|
||||
},
|
||||
(err) => {
|
||||
// console.log(`sw failed: ${err}`);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
// registerSW();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.bg-gray-900 {
|
||||
background-color: #121317;
|
||||
}
|
||||
</style>
|
||||
|
||||
<Route>
|
||||
{#if $router.path === '/forgot_password'}
|
||||
<Route path="/forgot_password">
|
||||
|
||||
Reference in New Issue
Block a user