From 78173a432494ec36b2ffa563dc45fa120de15d66 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Mon, 26 Feb 2024 00:07:41 +0000 Subject: [PATCH] refactor: remove code for manual service worker registration --- src/frontend/src/App.jsx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/frontend/src/App.jsx b/src/frontend/src/App.jsx index 70ce57f789..5eb7cbea52 100755 --- a/src/frontend/src/App.jsx +++ b/src/frontend/src/App.jsx @@ -144,21 +144,21 @@ ReactDOM.render( document.getElementById('app'), ); -// Register service worker -if (import.meta.env.MODE === 'production') { - if ('serviceWorker' in navigator) { - window.addEventListener('load', () => { - navigator.serviceWorker - .register('/service-worker.js') - .then((registration) => { - console.log('ServiceWorker registered: ', registration); - }) - .catch((error) => { - console.log('ServiceWorker registration failed: ', error); - }); - }); - } -} +// // Register service worker manually +// if (import.meta.env.MODE === 'production') { +// if ('serviceWorker' in navigator) { +// window.addEventListener('load', () => { +// navigator.serviceWorker +// .register('/service-worker.js') +// .then((registration) => { +// console.log('ServiceWorker registered: ', registration); +// }) +// .catch((error) => { +// console.log('ServiceWorker registration failed: ', error); +// }); +// }); +// } +// } // if (import.meta.env.MODE === 'development') { // navigator.serviceWorker.getRegistrations().then(function (registrations) { // for (let registration of registrations) {