forked from VinokurovVE/tests
Layout, Pages, Dashboard, MUI
This commit is contained in:
@ -2,8 +2,20 @@ import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App.tsx'
|
||||
import './index.css'
|
||||
import { registerSW } from 'virtual:pwa-register'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
const updateSW = registerSW({
|
||||
onNeedRefresh() {
|
||||
if (confirm("New content available. Reload?")) {
|
||||
updateSW(true);
|
||||
}
|
||||
},
|
||||
onOfflineReady() {
|
||||
console.log("offline ready");
|
||||
},
|
||||
});
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
|
Reference in New Issue
Block a user