mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 13:38:51 +00:00
27 lines
768 B
TypeScript
27 lines
768 B
TypeScript
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
|
|
import AppLayout from './ui/AppLayout';
|
|
import User from './pages/User';
|
|
import Dashboard from './pages/Dashboard';
|
|
import Room from './pages/Room';
|
|
import NotFound from './pages/NotFound';
|
|
|
|
function App() {
|
|
return (
|
|
<>
|
|
<BrowserRouter>
|
|
<Routes>
|
|
<Route element={<AppLayout />}>
|
|
<Route index element={<Navigate replace to="user" />} />
|
|
<Route path="dashboard" element={<Dashboard />} />
|
|
<Route path="user" element={<User />} />
|
|
<Route path="room" element={<Room />} />
|
|
</Route>
|
|
<Route path="*" element={<NotFound />} />
|
|
</Routes>
|
|
</BrowserRouter>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default App;
|