k
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {FC, ReactNode} from "react";
|
||||
import {AppShell} from "@mantine/core";
|
||||
import {Navbar} from "../../components/Navbar/Navbar.tsx";
|
||||
import {AppShell, Flex, rem} from "@mantine/core";
|
||||
import {useSelector} from "react-redux";
|
||||
import {RootState} from "../../redux/store.ts";
|
||||
import styles from './PageWrapper.module.css';
|
||||
import { Navbar } from "../../components/Navbar/Navbar.tsx";
|
||||
|
||||
export type Props = {
|
||||
children: ReactNode;
|
||||
@@ -13,15 +13,22 @@ const PageWrapper: FC<Props> = ({children}) => {
|
||||
return (
|
||||
<AppShell
|
||||
layout={"alt"}
|
||||
withBorder={false}
|
||||
navbar={authState.isAuthorized ? {
|
||||
width: '5%',
|
||||
width: "130px",
|
||||
breakpoint: "sm"
|
||||
} : undefined}
|
||||
>
|
||||
|
||||
<AppShell.Navbar>
|
||||
{authState.isAuthorized &&
|
||||
<Navbar/>
|
||||
<Flex className={styles['main-container']} h={"100%"} w={"100%"}
|
||||
pl={rem(20)}
|
||||
py={rem(20)}
|
||||
>
|
||||
<Navbar/>
|
||||
|
||||
</Flex>
|
||||
}
|
||||
</AppShell.Navbar>
|
||||
<AppShell.Main className={styles['main-container']}>
|
||||
|
||||
Reference in New Issue
Block a user