/** * PWA detection utilities */ /** * Check if the app is running as a PWA (installed/standalone mode) */ export function isPWAInstalled(): boolean { if (typeof window === 'undefined') return false; // Check for standalone display mode (most common) const isStandalone = window.matchMedia('(display-mode: standalone)').matches; // Check for iOS standalone mode const isIOSStandalone = (window.navigator as any).standalone === true; return isStandalone || isIOSStandalone; } /** * Get the current URL to open in browser */ export function getBrowserURL(): string { if (typeof window === 'undefined') return '/'; return window.location.href; }