32 lines
1.3 KiB
React
32 lines
1.3 KiB
React
|
|
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
|||
|
|
import MediaScreen from './pages/MediaScreen';
|
|||
|
|
import DataScreen from './pages/DataScreen';
|
|||
|
|
import DigitalTwin from './pages/DigitalTwin';
|
|||
|
|
import AiAssistant from './pages/AiAssistant';
|
|||
|
|
import VoiceAssistant from './pages/VoiceAssistant';
|
|||
|
|
import CompanyWall from './pages/CompanyWall';
|
|||
|
|
import ScreenLayout from './components/ScreenLayout';
|
|||
|
|
import './styles/tokens.css';
|
|||
|
|
|
|||
|
|
export default function App() {
|
|||
|
|
return (
|
|||
|
|
<BrowserRouter>
|
|||
|
|
<Routes>
|
|||
|
|
{/* 大屏页面:统一页眉布局注入 */}
|
|||
|
|
<Route element={<ScreenLayout />}>
|
|||
|
|
<Route path="/" element={<DataScreen />} />
|
|||
|
|
<Route path="/twin" element={<DigitalTwin />} />
|
|||
|
|
<Route path="/ai" element={<AiAssistant />} />
|
|||
|
|
<Route path="/screen" element={<MediaScreen />} />
|
|||
|
|
{/* 实时语音对话页(React 原生,复用页眉) */}
|
|||
|
|
<Route path="/voice" element={<VoiceAssistant />} />
|
|||
|
|
{/* 入驻企业展示墙 */}
|
|||
|
|
<Route path="/wall" element={<CompanyWall />} />
|
|||
|
|
</Route>
|
|||
|
|
{/* 管理后台已迁移至 FastAPI + Jinja(GET /admin),不由 React 路由接管 */}
|
|||
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|||
|
|
</Routes>
|
|||
|
|
</BrowserRouter>
|
|||
|
|
);
|
|||
|
|
}
|