1 |
6d10fe14
|
Dominik Poch
|
import { LayoutProps } from '../components/models/layoutProps';
|
2 |
|
|
import { Layout } from 'antd';
|
3 |
|
|
import { UserNavBar } from '../components/navigation/userNavBar';
|
4 |
|
|
import { AdminNavBar } from '../components/navigation/adminNavBar';
|
5 |
|
|
import 'antd/dist/antd.css';
|
6 |
|
|
|
7 |
|
|
const { Header, Content, Footer } = Layout;
|
8 |
|
|
|
9 |
|
|
/**
|
10 |
|
|
* Creates layout of main screens.
|
11 |
|
|
* @param props Html structure of a login form.
|
12 |
|
|
* @returns The login screen.
|
13 |
|
|
*/
|
14 |
|
|
export function MainLayout(props: LayoutProps) {
|
15 |
|
|
return (
|
16 |
|
|
<Layout>
|
17 |
|
|
<Header>
|
18 |
|
|
{/**
|
19 |
|
|
@todo: Select correct navigation bar
|
20 |
|
|
{user && <UserNavBar />}
|
21 |
|
|
{admin && <AdminNavBar />}
|
22 |
|
|
**/}
|
23 |
|
|
</Header>
|
24 |
|
|
<Content>
|
25 |
|
|
<main>{props.children}</main>
|
26 |
|
|
</Content>
|
27 |
|
|
<Footer></Footer>
|
28 |
|
|
</Layout>
|
29 |
|
|
);
|
30 |
|
|
}
|