Compare commits

...
Author SHA1 Message Date
mlsmaycon 06ff449a1c Force service worker uninstall 2022-08-02 17:47:06 +02:00
mlsmaycon e1d12b91a2 Force service worker uninstall 2022-08-02 17:27:11 +02:00
+13
View File
@@ -7,6 +7,7 @@ import history from "./utils/history";
import { getConfig } from "./config";
import {Auth0Provider} from "@auth0/auth0-react";
import {BrowserRouter} from "react-router-dom";
import Loading from "./components/Loading";
const onRedirectCallback = (appState:any) => {
history.push(
@@ -14,6 +15,17 @@ const onRedirectCallback = (appState:any) => {
);
};
const removeWorkers = () => {
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for (let registration of registrations) {
registration.unregister().then(function (b) {
console.log(b)
if (b){
window.location.reload()
}
})}})
}
const config = getConfig();
const providerConfig = {
@@ -41,3 +53,4 @@ root.render(
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
removeWorkers();