Spaces:
Sleeping
Sleeping
Download frontend-backup/src/App.tsx from edichat/edi.chat.test: direct link, hf CLI and curl.
- Browser
- Download file 2.54 kB
-
https://huggingface.co/spaces/edichat/edi.chat.test/resolve/main/frontend-backup/src/App.tsx
- Command line
-
hf download hf://spaces/edichat/edi.chat.test/frontend-backup/src/App.tsx
-
curl -L -o App.tsx https://huggingface.co/spaces/edichat/edi.chat.test/resolve/main/frontend-backup/src/App.tsx
2.54 kB
| import React, { Suspense, lazy } from 'react'; | |
| import { Routes, Route, Navigate } from 'react-router-dom'; | |
| import { Box, CircularProgress } from '@mui/material'; | |
| import Layout from './components/Layout'; | |
| // Lazy-loaded Pages | |
| const LoginPage = lazy(() => import('./pages/LoginPage')); | |
| const ChatPage = lazy(() => import('./pages/ChatPage')); | |
| const DashboardPage = lazy(() => import('./pages/DashboardPage')); | |
| const ProfilePage = lazy(() => import('./pages/ProfilePage')); | |
| const FacultyDashboard = lazy(() => import('./pages/FacultyDashboard')); | |
| const FacultyAnalyticsPage = lazy(() => import('./pages/FacultyAnalyticsPage')); | |
| const StudentServicesPage = lazy(() => import('./pages/StudentServicesPage')); | |
| const KnowledgeBasePage = lazy(() => import('./pages/KnowledgeBasePage')); | |
| const SettingsPage = lazy(() => import('./pages/SettingsPage')); | |
| const App: React.FC = () => { | |
| // TEMPORARY: AUTHENTICATION BYPASSED FOR DEVELOPMENT | |
| const LoadingSpinner = () => ( | |
| <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '50vh' }}> | |
| <CircularProgress /> | |
| </Box> | |
| ); | |
| return ( | |
| <Box sx={{ display: 'flex', flexDirection: 'column', minHeight: '100vh' }}> | |
| <Layout> | |
| <Suspense fallback={<LoadingSpinner />}> | |
| <Routes> | |
| {/* All Routes - No Authentication Required */} | |
| <Route path="/" element={<Navigate to="/dashboard" replace />} /> | |
| <Route path="/login" element={<Navigate to="/dashboard" replace />} /> | |
| <Route path="/dashboard" element={<DashboardPage />} /> | |
| <Route path="/chat" element={<ChatPage />} /> | |
| <Route path="/chat/:conversationId" element={<ChatPage />} /> | |
| <Route path="/profile" element={<ProfilePage />} /> | |
| <Route path="/student-services" element={<StudentServicesPage />} /> | |
| <Route path="/knowledge" element={<KnowledgeBasePage />} /> | |
| <Route path="/settings" element={<SettingsPage />} /> | |
| {/* Faculty Routes */} | |
| <Route path="/faculty" element={<FacultyDashboard />} /> | |
| <Route path="/faculty/dashboard" element={<FacultyDashboard />} /> | |
| <Route path="/faculty/courses/:courseId" element={<div>Course Detail Page</div>} /> | |
| <Route path="/faculty/analytics" element={<FacultyAnalyticsPage />} /> | |
| {/* Catch all */} | |
| <Route path="*" element={<Navigate to="/dashboard" replace />} /> | |
| </Routes> | |
| </Suspense> | |
| </Layout> | |
| </Box> | |
| ); | |
| }; | |
| export default App; |