2023-06-04 12:23:09 +03:00
|
|
|
import { Navigate, Route, Routes } from 'react-router-dom';
|
|
|
|
|
2023-06-17 22:24:15 +03:00
|
|
|
import { DefaultLayout } from '@/ui/layout/DefaultLayout';
|
|
|
|
|
2023-06-04 12:23:09 +03:00
|
|
|
import { RequireAuth } from './modules/auth/components/RequireAuth';
|
2023-06-18 01:18:13 +03:00
|
|
|
import { Callback } from './pages/auth/Callback';
|
|
|
|
import { Index } from './pages/auth/Index';
|
2023-06-04 12:23:09 +03:00
|
|
|
import { Login } from './pages/auth/Login';
|
|
|
|
import { Companies } from './pages/companies/Companies';
|
|
|
|
import { Opportunities } from './pages/opportunities/Opportunities';
|
|
|
|
import { People } from './pages/people/People';
|
2023-06-13 18:10:57 +03:00
|
|
|
import { SettingsProfile } from './pages/settings/SettingsProfile';
|
2022-12-01 17:58:08 +03:00
|
|
|
|
2023-06-08 11:36:37 +03:00
|
|
|
export function App() {
|
|
|
|
return (
|
2023-06-17 22:24:15 +03:00
|
|
|
<DefaultLayout>
|
|
|
|
<Routes>
|
|
|
|
<Route
|
|
|
|
path="*"
|
|
|
|
element={
|
|
|
|
<RequireAuth>
|
|
|
|
<Routes>
|
|
|
|
<Route path="" element={<Navigate to="/people" replace />} />
|
|
|
|
<Route path="people" element={<People />} />
|
|
|
|
<Route path="companies" element={<Companies />} />
|
|
|
|
<Route path="opportunities" element={<Opportunities />} />
|
2023-06-18 01:18:13 +03:00
|
|
|
<Route
|
|
|
|
path="settings/*"
|
|
|
|
element={
|
|
|
|
<Routes>
|
|
|
|
<Route path="profile" element={<SettingsProfile />} />
|
|
|
|
</Routes>
|
|
|
|
}
|
|
|
|
/>
|
2023-06-17 22:24:15 +03:00
|
|
|
</Routes>
|
|
|
|
</RequireAuth>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
path="auth/*"
|
|
|
|
element={
|
|
|
|
<Routes>
|
2023-06-18 01:18:13 +03:00
|
|
|
<Route path="" element={<Index />} />
|
|
|
|
<Route path="callback" element={<Callback />} />
|
2023-06-17 22:24:15 +03:00
|
|
|
<Route path="login" element={<Login />} />
|
|
|
|
</Routes>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</Routes>
|
|
|
|
</DefaultLayout>
|
2022-12-01 17:58:08 +03:00
|
|
|
);
|
|
|
|
}
|