import { useState } from 'react' import { useTranslation } from 'react-i18next' import { RefreshCw, X } from 'lucide-react' import { usePwaUpdate } from '../hooks/usePwaUpdate.js' export default function PwaUpdatePrompt() { const { t } = useTranslation() const { needRefresh, updateApp } = usePwaUpdate() const [updating, setUpdating] = useState(false) const [dismissed, setDismissed] = useState(false) if (!needRefresh || dismissed) return null const handleUpdate = async () => { setUpdating(true) try { await updateApp() } finally { setUpdating(false) } } return (
{t('pwa.update_title')}
{t('pwa.update_desc')}