diff --git a/src/main.ts b/src/main.ts index 0c09810..0382cfc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,7 @@ import plLang from './locales/pl.json'; import { createI18n } from 'vue-i18n'; import { createPinia } from 'pinia'; +import { registerSW } from 'virtual:pwa-register'; const i18n = createI18n({ locale: 'pl', @@ -19,6 +20,15 @@ const i18n = createI18n({ enableLegacy: false, }); +registerSW({ + onRegistered(r) { + r && + setInterval(() => { + r.update(); + }, 60 * 60 * 1000); + }, +}); + const clickOutsideDirective: Directive = { mounted(el, binding) { el.clickOutsideEvent = (event: Event) => {