import { useEffect } from 'react' import useInstallPromptStore, { APK_URL, canOfferApp } from '../store/installPromptStore' import { useTranslation } from '@xenia/i18n' const BENEFITS = [ { icon: '⚡', title: 'install.fast', text: 'install.fastText' }, { icon: '📶', title: 'install.wifi', text: 'install.wifiText' }, { icon: '🔒', title: 'install.secure', text: 'install.secureText' }, { icon: '🔄', title: 'install.noSetup', text: 'install.noSetupText' }, ] const STEPS = [ 'install.step1', 'install.step2', 'install.step3', ] /** * Dialog offering the Android app to browser users (see installPromptStore). * Opens by itself once; afterwards from the side drawer. */ export default function InstallAppDialog() { const { t } = useTranslation('waiter') const { open, dismiss, autoOpen } = useInstallPromptStore() useEffect(() => { if (canOfferApp()) autoOpen() }, [autoOpen]) if (!open) return null return (
{t('install.intro')}