Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06ff449a1c | ||
|
|
e1d12b91a2 |
@@ -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();
|
||||
Reference in New Issue
Block a user