35 lines
1.4 KiB
TypeScript
35 lines
1.4 KiB
TypeScript
import { MemoryRouter, Routes, Route, Navigate, Outlet } from 'react-router';
|
|
import { Home } from './pages/Home';
|
|
import { History } from './pages/History';
|
|
import { Profile } from './pages/Profile';
|
|
import { Chat } from './pages/Chat';
|
|
import { Calendar } from './pages/Calendar';
|
|
import { NotificationDetail } from './pages/NotificationDetail';
|
|
import { AuthPhone } from './pages/AuthPhone';
|
|
import { AuthOtp } from './pages/AuthOtp';
|
|
import { AuthLoading } from './pages/AuthLoading';
|
|
import { AuthConsent } from './pages/AuthConsent';
|
|
import { Root } from './pages/Root';
|
|
|
|
export default function App() {
|
|
return (
|
|
<MemoryRouter initialEntries={['/']}>
|
|
<Routes>
|
|
<Route path="/" element={<Root />}>
|
|
<Route index element={<Home />} />
|
|
<Route path="history" element={<History />} />
|
|
<Route path="profile" element={<Profile />} />
|
|
<Route path="chat/:id" element={<Chat />} />
|
|
<Route path="calendar" element={<Calendar />} />
|
|
<Route path="notification/:id" element={<NotificationDetail />} />
|
|
<Route path="auth/consent" element={<AuthConsent />} />
|
|
<Route path="auth/phone" element={<AuthPhone />} />
|
|
<Route path="auth/otp" element={<AuthOtp />} />
|
|
<Route path="auth/loading" element={<AuthLoading />} />
|
|
</Route>
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</Routes>
|
|
</MemoryRouter>
|
|
);
|
|
}
|