Make rates installable as a PWA
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b90f6bcbd6
commit
4eea566799
7 changed files with 4055 additions and 15 deletions
|
|
@ -9,6 +9,14 @@ const qc = new QueryClient({
|
|||
defaultOptions: { queries: { retry: 1, staleTime: 30_000 } },
|
||||
})
|
||||
|
||||
|
||||
if (new URLSearchParams(window.location.search).has('install')) {
|
||||
window.addEventListener('beforeinstallprompt', e => {
|
||||
e.preventDefault()
|
||||
;(e as Event & { prompt: () => Promise<void> }).prompt()
|
||||
}, { once: true })
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
<BrowserRouter basename="/rates">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue