'use client'; import { usePWAInstall } from '@/lib/pwa'; import { Download, X, Smartphone } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useState } from 'react'; export default function InstallPrompt() { const { isInstallable, isInstalled, install, dismiss } = usePWAInstall(); const [isDismissed, setIsDismissed] = useState(false); if (isInstalled || isDismissed || !isInstallable) return null; return ( // bottom-28 = 7rem = 112px. Sits clearly above the 64px bottom nav // + 3px brand-accent + safe-area padding, with ~40px of visual gap // so the prompt never reads as part of the chrome. Previously // bottom-20 (80px) put the prompt's bottom edge flush with the // nav's top, which made it look like the nav was being covered. // // pointer-events: none on the outer container so taps on the // empty card area pass through to whatever's underneath (the map, // a list, etc.) — only the actual buttons stay clickable.
Add to home screen for the best experience