/** * NativeUpdateNotice: this server's UI needs a newer app binary than the one * installed (native/capabilities.ts, minNativeShellApi). The UI updates with * the server, the binary only through the store, so the two can drift; the * notice says so and leads to the store instead of leaving native calls to * fail one by one. Rendered once in App, inside the app only. */ import { Download, X } from 'lucide-react'; import React, { useState } from 'react'; import { useTranslation } from '../../i18n'; import { useNativeCapabilities } from '../../native/capabilities'; const STORE_URL = { ios: 'https://apps.apple.com/app/id6831237775', android: 'https://play.google.com/store/apps/details?id=com.liketrek.trek', } as const; export default function NativeUpdateNotice(): React.ReactElement | null { const { t } = useTranslation(); const { caps, updateRequired } = useNativeCapabilities(); const [dismissed, setDismissed] = useState(false); if (!updateRequired || dismissed || caps.platform === 'web') return null; const store = caps.platform === 'android' ? STORE_URL.android : STORE_URL.ios; return (