Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download web_app/src/main.tsx from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/main.tsx
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_app/src/main.tsx
-
curl -L -o main.tsx https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/main.tsx
1.48 kB
| // Initialize OpenTelemetry browser tracing ONCE, before anything else renders. | |
| import './instrumentation' | |
| import React from 'react' | |
| import ReactDOM from 'react-dom/client' | |
| import { BrowserRouter } from 'react-router-dom' | |
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | |
| import { AuthProvider } from './contexts/AuthContext' | |
| import { LocationProvider } from './contexts/LocationContext' | |
| import ScrollToTop from './components/ScrollToTop' | |
| import App from './App' | |
| import './index.css' | |
| import { installExtensionConsoleNoiseFilter } from './utils/filterExtensionConsoleNoise' | |
| import { installStaleDeployReload } from './utils/staleDeploy' | |
| installExtensionConsoleNoiseFilter() | |
| // A tab open across a deploy asks for lazy chunks the deploy removed: reload once (#936). | |
| installStaleDeployReload() | |
| const queryClient = new QueryClient({ | |
| defaultOptions: { | |
| queries: { | |
| refetchOnWindowFocus: false, | |
| retry: 1, | |
| staleTime: 5 * 60 * 1000, // 5 minutes | |
| }, | |
| }, | |
| }) | |
| ReactDOM.createRoot(document.getElementById('root')!).render( | |
| <React.StrictMode> | |
| <QueryClientProvider client={queryClient}> | |
| {/* react-router 7: the v7_* future flags are the default behaviour and the prop is gone */} | |
| <BrowserRouter> | |
| <ScrollToTop /> | |
| <AuthProvider> | |
| <LocationProvider> | |
| <App /> | |
| </LocationProvider> | |
| </AuthProvider> | |
| </BrowserRouter> | |
| </QueryClientProvider> | |
| </React.StrictMode>, | |
| ) | |