Spaces:
Runtime error
Runtime error
Download frontend/src/App.jsx from cuiconnect/backend: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/cuiconnect/backend/resolve/main/frontend/src/App.jsx
- Command line
-
hf download hf://spaces/cuiconnect/backend/frontend/src/App.jsx
-
curl -L -o App.jsx https://huggingface.co/spaces/cuiconnect/backend/resolve/main/frontend/src/App.jsx
1.14 kB
| import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom' | |
| import RequireAdminAuth from './auth/RequireAdminAuth' | |
| import RequireAuth from './auth/RequireAuth' | |
| import AdminLogin from './pages/AdminLogin' | |
| import AdminPanel from './pages/AdminPanel' | |
| import ChatPage from './pages/ChatPage' | |
| import Login from './pages/Login' | |
| import Signup from './pages/Signup' | |
| export default function App() { | |
| return ( | |
| <BrowserRouter> | |
| <Routes> | |
| <Route path="/" element={<Navigate to="/login" replace />} /> | |
| <Route path="/login" element={<Login />} /> | |
| <Route path="/signup" element={<Signup />} /> | |
| <Route path="/admin/login" element={<AdminLogin />} /> | |
| <Route | |
| path="/admin" | |
| element={ | |
| <RequireAdminAuth> | |
| <AdminPanel /> | |
| </RequireAdminAuth> | |
| } | |
| /> | |
| <Route path="/home" element={<Navigate to="/chat" replace />} /> | |
| <Route | |
| path="/chat" | |
| element={ | |
| <RequireAuth> | |
| <ChatPage /> | |
| </RequireAuth> | |
| } | |
| /> | |
| </Routes> | |
| </BrowserRouter> | |
| ) | |
| } | |