pwa setting
This commit is contained in:
@@ -33,6 +33,12 @@ const toastStyle: React.CSSProperties = {
|
||||
minWidth: 260,
|
||||
};
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js').catch(() => {});
|
||||
});
|
||||
}
|
||||
|
||||
const root = document.getElementById('admin-root')!;
|
||||
createRoot(root).render(
|
||||
<React.StrictMode>
|
||||
|
||||
Reference in New Issue
Block a user