2024-06-11 17:02:00 +02:00
|
|
|
export default function RegisterServiceWorker() {
|
2024-06-06 16:35:55 +02:00
|
|
|
if ('serviceWorker' in navigator) {
|
2024-06-11 17:02:00 +02:00
|
|
|
import('./StartServiceWorker.tsx').then((mod) => {
|
|
|
|
const href = mod.default()
|
|
|
|
navigator.serviceWorker.register(href, { scope: '/', type: 'module' })
|
|
|
|
})
|
2024-06-06 16:35:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return <></>
|
|
|
|
}
|