move * to apps/frontend
Main daploy / deploy (push) Successful in 43s

This commit is contained in:
2024-11-21 01:15:06 +02:00
parent 3ac451e5f3
commit 11bba7a275
89 changed files with 35 additions and 23 deletions
@@ -0,0 +1,14 @@
export async function registerServiceWorker() {
if (!('serviceWorker' in navigator)) {
throw new Error('Ваш браузер не поддерживает Service Worker.')
}
try {
const registration = await navigator.serviceWorker.register('/service-worker.js')
console.log('Service Worker зарегистрирован:', registration)
return registration
} catch (error) {
console.error('Ошибка регистрации Service Worker:', error)
throw error
}
}