mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 08:23:35 +00:00
Nutstack PWA Manifest
This commit is contained in:
1 parent
24920117ae
commit
1c991e3185
5 files changed
+67
No files matched your search
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user