mirror of
https://github.com/decompme/decomp.me.git
synced 2026-02-21 13:59:25 -06:00
Unregister all service workers (#598)
- use stretch instead of old-spec fill-available - unregister service workers on load
This commit is contained in:
@@ -110,7 +110,7 @@ body.no-scroll {
|
||||
overflow: hidden;
|
||||
|
||||
#__next {
|
||||
height: fill-available;
|
||||
height: stretch;
|
||||
height: 100svh;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,18 @@ export default function MyApp({ Component, pageProps }) {
|
||||
}
|
||||
}, [])
|
||||
|
||||
// Unregister all service workers (#593) - temporary until we make a new, better service worker
|
||||
useEffect(() => {
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||
for (const registration of registrations) {
|
||||
registration.unregister()
|
||||
console.warn("unregistered service worker:", registration)
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [])
|
||||
|
||||
return <Layout>
|
||||
<Head>
|
||||
<meta name="theme-color" content={themeColor} />
|
||||
|
||||
Reference in New Issue
Block a user