app.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { Route, Routes } from 'react-router-dom';
  2. import { Layout } from '../components/layout';
  3. import {
  4. HomeView,
  5. NotFoundView,
  6. ProjectsView,
  7. ProjectDetailView,
  8. ProjectEditView,
  9. TasksView,
  10. AnnotationsView,
  11. } from '../views';
  12. /**
  13. * Annotation Platform Application
  14. *
  15. * This is the main application component for the annotation platform.
  16. * It provides routing and integrates with Layout component for
  17. * backend management UI style.
  18. *
  19. * Requirements: 4.1, 4.2, 4.8, 7.3, 7.6
  20. */
  21. export function App() {
  22. return (
  23. <Layout>
  24. <Routes>
  25. {/* Home Route */}
  26. <Route path="/" element={<HomeView />} />
  27. {/* Projects Routes */}
  28. <Route path="/projects" element={<ProjectsView />} />
  29. <Route path="/projects/:id" element={<ProjectDetailView />} />
  30. <Route path="/projects/:id/edit" element={<ProjectEditView />} />
  31. {/* Tasks Routes */}
  32. <Route path="/tasks" element={<TasksView />} />
  33. {/* TODO: Add task annotation route */}
  34. {/* <Route path="/tasks/:id/annotate" element={<AnnotationView />} /> */}
  35. {/* Annotations Routes */}
  36. <Route path="/annotations" element={<AnnotationsView />} />
  37. {/* 404 Not Found */}
  38. <Route path="*" element={<NotFoundView />} />
  39. </Routes>
  40. </Layout>
  41. );
  42. }
  43. export default App;