"添加前端模板和运行代码模块"

This commit is contained in:
Codex
2026-06-01 13:43:09 +08:00
parent 24045274ad
commit 8092c4b1f8
587 changed files with 99761 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import React from 'react';
import { HashRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { Toaster } from '@/components/ui/sonner';
import routes from './routes';
const App: React.FC = () => {
return (
<Router>
<Toaster />
<div className="flex flex-col min-h-screen">
<main className="flex-grow">
<Routes>
{routes.map((route, index) => (
<Route
key={index}
path={route.path}
element={route.element}
/>
))}
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
</main>
</div>
</Router>
);
};
export default App;