Spaces:
Sleeping
Sleeping
Download main.tsx from RonitP1/Stock-Rivals: direct link, hf CLI and curl.
- Browser
- Download file 763 Bytes
-
https://huggingface.co/spaces/RonitP1/Stock-Rivals/resolve/main/main.tsx
- Command line
-
hf download hf://spaces/RonitP1/Stock-Rivals/main.tsx
-
curl -L -o main.tsx https://huggingface.co/spaces/RonitP1/Stock-Rivals/resolve/main/main.tsx
763 Bytes
| import {StrictMode} from 'react'; | |
| import {createRoot} from 'react-dom/client'; | |
| import App from './App.tsx'; | |
| import './index.css'; | |
| createRoot(document.getElementById('root')!).render( | |
| <StrictMode> | |
| <App /> | |
| </StrictMode>, | |
| ); | |
| // PWA install support + auto-refresh when a new deploy's SW takes over. | |
| if ('serviceWorker' in navigator) { | |
| window.addEventListener('load', () => { | |
| navigator.serviceWorker.register('/sw.js').then((reg) => { | |
| reg.addEventListener('updatefound', () => { | |
| const worker = reg.installing; | |
| worker?.addEventListener('statechange', () => { | |
| if (worker.state === 'activated' && navigator.serviceWorker.controller) { | |
| window.location.reload(); | |
| } | |
| }); | |
| }); | |
| }); | |
| }); | |
| } | |