File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
frontend/src/libs/components Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { type FC } from 'react' ;
2
2
3
+ import { Header , RouterOutlet } from '~/libs/components/components.js' ;
3
4
import { useCallback , useState } from '~/libs/hooks/hooks.js' ;
4
5
import { type TabName } from '~/libs/types/types.js' ;
5
6
import { Sidebar } from '~/pages/dashboard/components/sidebar/sidebar.js' ;
6
7
7
- import { Header } from '../components.js' ;
8
8
import styles from './styles.module.scss' ;
9
9
10
10
type Properties = {
11
11
isHeaderHidden ?: boolean ;
12
12
isSidebarHidden ?: boolean ;
13
- children : JSX . Element ;
13
+ children ? : JSX . Element ;
14
14
} ;
15
15
16
16
const PageLayout : FC < Properties > = ( {
@@ -37,7 +37,10 @@ const PageLayout: FC<Properties> = ({
37
37
< Sidebar selectedTab = { selectedTab } onTabClick = { handleTabSelect } />
38
38
</ div >
39
39
) }
40
- < main className = { styles . content } > { children } </ main >
40
+ < main className = { styles . content } >
41
+ < RouterOutlet />
42
+ { children }
43
+ </ main >
41
44
</ div >
42
45
) ;
43
46
} ;
Original file line number Diff line number Diff line change @@ -7,14 +7,13 @@ import { Dashboard } from '~/pages/dashboard/dashboard.js';
7
7
import { NotFound } from '~/pages/not-found/not-found.js' ;
8
8
import { WelcomePage } from '~/pages/welcome/welcome.js' ;
9
9
10
- import { App } from '../app/app.js' ;
11
10
import { ProtectedRoute } from '../components.js' ;
12
11
import { PageLayout } from '../page-layout/page-layout.js' ;
13
12
import { RouterProvider } from '../router-provider/router-provider.js' ;
14
13
15
14
const Router = ( ) : JSX . Element => (
16
15
< RouterProvider >
17
- < Route path = { AppRoute . ROOT } element = { < App /> } >
16
+ < Route path = { AppRoute . ROOT } element = { < PageLayout isSidebarHidden /> } >
18
17
< Route path = { AppRoute . WELCOME } element = { < WelcomePage /> } />
19
18
< Route path = { AppRoute . SIGN_IN } element = { < Auth /> } />
20
19
< Route path = { AppRoute . SIGN_UP } element = { < Auth /> } />
You can’t perform that action at this time.
0 commit comments