fix: clear sw

This commit is contained in:
DIYgod 2022-11-30 02:17:13 +00:00
parent 1e9ca2e9b6
commit e9aaf3444a
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
1 changed files with 10 additions and 0 deletions

View File

@ -84,6 +84,16 @@ const queryClient = new QueryClient({
const persister = createIDBPersister()
try {
navigator.serviceWorker?.getRegistrations?.().then((registrations) => {
registrations?.forEach((registration) => {
registration.unregister()
})
})
} catch (error) {
console.warn(error)
}
function MyApp({ Component, pageProps }: any) {
const getLayout = Component.getLayout ?? ((page: any) => page)