Spaces:
Sleeping
Sleeping
| import React from 'react'; | |
| import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | |
| import Navbar from './components/Navbar'; | |
| import Home from './pages/Home'; | |
| import About from './pages/About'; | |
| import ApiDocs from './pages/ApiDocs'; | |
| import Tasks from './pages/Tasks'; | |
| const App: React.FC = () => { | |
| return ( | |
| <Router> | |
| <div className="min-h-screen bg-gray-50 flex flex-col"> | |
| <Navbar /> | |
| <main className="flex-grow container mx-auto px-4 py-8 sm:px-6 lg:px-8"> | |
| <Routes> | |
| <Route path="/" element={<Home />} /> | |
| <Route path="/tasks" element={<Tasks />} /> | |
| <Route path="/about" element={<About />} /> | |
| <Route path="/api-docs" element={<ApiDocs />} /> | |
| </Routes> | |
| </main> | |
| <footer className="bg-white border-t border-gray-200 py-8"> | |
| <div className="container mx-auto px-4 text-center text-gray-500 text-sm"> | |
| <p>© {new Date().getFullYear()} Koa Web 应用 - 极致性能,全中文支持</p> | |
| </div> | |
| </footer> | |
| </div> | |
| </Router> | |
| ); | |
| }; | |
| export default App; | |