This commit is contained in:
2024-03-17 03:39:38 +03:00
parent e2962f3be2
commit cc14105276
24 changed files with 4218 additions and 42 deletions

View File

@@ -1,8 +1,9 @@
import {FC, ReactNode} from "react";
import {Flex} from "@mantine/core";
import {Flex, rem} from "@mantine/core";
import {Navbar} from "../../components/Navbar/Navbar.tsx";
import {useSelector} from "react-redux";
import {RootState} from "../../redux/store.ts";
import Header from "../../components/Header/Header.tsx";
export type Props = {
children: ReactNode;
@@ -10,10 +11,20 @@ export type Props = {
const PageWrapper: FC<Props> = ({children}) => {
const authState = useSelector((state: RootState) => state.auth);
return (<Flex style={{flex: 1}}>
{authState.isAuthorized &&
<Navbar/>
}
{children}
<div style={{flex: 1, display: 'flex', flexDirection: 'column'}}>
<Header/>
<div style={{padding:rem(20), flex:1}}>
{children}
</div>
</div>
</Flex>
)
}