Spaces:
Running
Running
Download ui/src/main.tsx from AItoolstack/AI-PolicyTrace: direct link, hf CLI and curl.
- Browser
- Download file 633 Bytes
-
https://huggingface.co/spaces/AItoolstack/AI-PolicyTrace/resolve/main/ui/src/main.tsx
- Command line
-
hf download hf://spaces/AItoolstack/AI-PolicyTrace/ui/src/main.tsx
-
curl -L -o main.tsx https://huggingface.co/spaces/AItoolstack/AI-PolicyTrace/resolve/main/ui/src/main.tsx
633 Bytes
| import React from 'react' | |
| import { pdfjs } from 'react-pdf' | |
| // Configure pdfjs worker (Vite resolves this at build time) | |
| pdfjs.GlobalWorkerOptions.workerSrc = new URL( | |
| 'pdfjs-dist/build/pdf.worker.min.mjs', | |
| import.meta.url, | |
| ).toString() | |
| import ReactDOM from 'react-dom/client' | |
| import { BrowserRouter } from 'react-router-dom' | |
| import App from './App' | |
| import './index.css' | |
| import 'react-pdf/dist/Page/AnnotationLayer.css' | |
| import 'react-pdf/dist/Page/TextLayer.css' | |
| ReactDOM.createRoot(document.getElementById('root')!).render( | |
| <React.StrictMode> | |
| <BrowserRouter> | |
| <App /> | |
| </BrowserRouter> | |
| </React.StrictMode>, | |
| ) | |