'use client'; import { useState, useEffect } from 'react'; import { Download, X } from 'lucide-react'; import { canInstallPWA, installPWA, isPWAInstalled } from '@/lib/mobile/pwa'; export default function InstallPrompt() { const [showPrompt, setShowPrompt] = useState(false); useEffect(() => { if (isPWAInstalled()) return; const handleInstallable = () => setShowPrompt(true); window.addEventListener('pwa-installable', handleInstallable); // Check if already installable if (canInstallPWA()) setShowPrompt(true); return () => { window.removeEventListener('pwa-installable', handleInstallable); }; }, []); if (!showPrompt) return null; return (

Install MedOS

Add to your home screen for quick access, offline support, and a native app experience.

); }