Spaces:
Sleeping
Sleeping
Download src/Routing.jsx from randome-games/proxy: direct link, hf CLI and curl.
- Browser
- Download file 468 Bytes
-
https://huggingface.co/spaces/randome-games/proxy/resolve/main/src/Routing.jsx
- Command line
-
hf download hf://spaces/randome-games/proxy/src/Routing.jsx
-
curl -L -o Routing.jsx https://huggingface.co/spaces/randome-games/proxy/resolve/main/src/Routing.jsx
468 Bytes
| import { Suspense, memo } from 'react'; | |
| import { Route, Routes } from 'react-router-dom'; | |
| import Fallback from './fallback'; | |
| const Routing = memo(({ pages }) => { | |
| return ( | |
| <Suspense fallback={<Fallback />}> | |
| <Routes> | |
| {pages.map((page, index) => ( | |
| <Route key={`${page.path}-${index}`} path={page.path} element={page.element} /> | |
| ))} | |
| </Routes> | |
| </Suspense> | |
| ); | |
| }); | |
| Routing.displayName = 'Routing'; | |
| export default Routing; | |