feat(platform): add vehicle data management console
This commit is contained in:
28
vehicle-data-platform/apps/web/src/App.tsx
Normal file
28
vehicle-data-platform/apps/web/src/App.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { useState } from 'react';
|
||||
import { AppShell, type PageKey } from './layout/AppShell';
|
||||
import { Dashboard } from './pages/Dashboard';
|
||||
import { History } from './pages/History';
|
||||
import { Mileage } from './pages/Mileage';
|
||||
import { Quality } from './pages/Quality';
|
||||
import { Realtime } from './pages/Realtime';
|
||||
import { VehicleDetail } from './pages/VehicleDetail';
|
||||
import { Vehicles } from './pages/Vehicles';
|
||||
|
||||
const pages: Record<PageKey, JSX.Element> = {
|
||||
dashboard: <Dashboard />,
|
||||
vehicles: <Vehicles />,
|
||||
realtime: <Realtime />,
|
||||
detail: <VehicleDetail />,
|
||||
history: <History />,
|
||||
mileage: <Mileage />,
|
||||
quality: <Quality />
|
||||
};
|
||||
|
||||
export default function App() {
|
||||
const [activePage, setActivePage] = useState<PageKey>('dashboard');
|
||||
return (
|
||||
<AppShell activePage={activePage} onChange={setActivePage}>
|
||||
{pages[activePage]}
|
||||
</AppShell>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user