2021-06-18 15:57:08 +01:00
|
|
|
import { render } from "preact";
|
2021-06-18 17:57:08 +01:00
|
|
|
import "./styles/index.scss";
|
2021-06-18 15:57:08 +01:00
|
|
|
import { App } from "./app";
|
2021-06-18 12:05:01 +01:00
|
|
|
|
2021-06-18 19:25:33 +01: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-18 15:46:30 +01:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
2021-06-18 15:57:08 +01:00
|
|
|
render(<App />, document.getElementById("app")!);
|