MSP-3104 connect ProfilePage to project
This commit is contained in:
1 parent
f2e08329b5
commit
0632a08f15
2 files changed
+16
-5
No files matched your search
@@ -13,6 +13,9 @@ const LoginPage = lazy(() => import('@pages/LoginPage'))
|
||||
|
||||
const ErrorPage = lazy(() => import('@components/ErrorPage'))
|
||||
|
||||
|
||||
const ProfilePage = lazy(() => import('@pages/ProfilePage'))
|
||||
|
||||
const Routers = () => {
|
||||
return (
|
||||
<Routes>
|
||||
@@ -26,10 +29,17 @@ const Routers = () => {
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path={`${routePaths.profile}`}
|
||||
element={
|
||||
<Suspense fallback={<Spin />}>
|
||||
<ProfilePage />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
</Route>
|
||||
</Route>
|
||||
<Route
|
||||
path={routePaths.error}
|
||||
<Route path={routePaths.error}
|
||||
element={
|
||||
<Suspense fallback={<Spin />}>
|
||||
<ErrorPage />
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
type RoutePaths = 'home' | 'notFound' | 'error' | 'login'
|
||||
type RoutePaths = 'home' | 'notFound' | 'error' | 'login' | 'profile'
|
||||
|
||||
export const routePaths: Record<RoutePaths, string> = {
|
||||
home: '/',
|
||||
error: '/error',
|
||||
notFound: '*',
|
||||
login: '/login'
|
||||
login: '/login',
|
||||
profile: '/profile'
|
||||
}
|
||||
Reference in new issue
Block a user