fix: add SSR safety checks for window.matchMedia in PWA components
This commit is contained in:
@@ -101,6 +101,8 @@ export function ServiceWorkerProvider({ children }: { children: React.ReactNode
|
||||
}
|
||||
|
||||
const setupInstallPrompt = () => {
|
||||
if (typeof window === 'undefined') return
|
||||
|
||||
// Listen for beforeinstallprompt event
|
||||
window.addEventListener('beforeinstallprompt', (e) => {
|
||||
console.log('[PWA] Install prompt available')
|
||||
|
||||
Reference in New Issue
Block a user