2021-06-18 14:25:33 -04:00
|
|
|
import { registerSW } from 'virtual:pwa-register'
|
|
|
|
const updateSW = registerSW({
|
|
|
|
onNeedRefresh() {
|
|
|
|
// ! FIXME: temp
|
|
|
|
updateSW(true);
|
|
|
|
// show a prompt to user
|
|
|
|
},
|
|
|
|
onOfflineReady() {
|
|
|
|
console.info('Ready to work offline.');
|
|
|
|
// show a ready to work offline to user
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2021-06-22 09:22:35 -04:00
|
|
|
import "./styles/index.scss";
|
2021-06-27 16:54:31 -04:00
|
|
|
import { render } from "preact";
|
2021-06-22 09:22:35 -04:00
|
|
|
import { App } from "./pages/app";
|
|
|
|
|
2021-06-18 10:46:30 -04:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
2021-06-18 10:57:08 -04:00
|
|
|
render(<App />, document.getElementById("app")!);
|