Nutstack PWA Manifest

This commit is contained in:
lemonknowsall committed 2025-10-20 13:25:54 -07:00
1 parent 24920117ae
commit 1c991e3185
5 files changed
+67

No files matched your search

+13
View File
@@ -15,3 +15,16 @@ createRoot(document.getElementById("root")!).render(
<App />
</ErrorBoundary>
);
// Register service worker for PWA
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js')
.then((registration) => {
console.log('SW registered: ', registration);
})
.catch((registrationError) => {
console.log('SW registration failed: ', registrationError);
});
});
}