feat: deal card, deal status, deal new dates, indicator, hide navbar

This commit is contained in:
2024-09-30 08:52:21 +03:00
parent 31d2c86770
commit 99b71b9da9
15 changed files with 313 additions and 146 deletions

View File

@@ -4,12 +4,14 @@ import { useSelector } from "react-redux";
import { RootState } from "../../redux/store.ts";
import styles from "./PageWrapper.module.css";
import { Navbar } from "../../components/Navbar/Navbar.tsx";
import HideNavbarAffix from "../../components/HideNavbarAffix/HideNavbarAffix.tsx";
export type Props = {
children: ReactNode;
};
const PageWrapper: FC<Props> = ({ children }) => {
const authState = useSelector((state: RootState) => state.auth);
const uiState = useSelector((state: RootState) => state.ui);
return (
<AppShell
layout={"alt"}
@@ -17,10 +19,12 @@ const PageWrapper: FC<Props> = ({ children }) => {
navbar={
authState.isAuthorized && !authState.isGuest
? {
width: "130px",
breakpoint: "sm",
}
width: "130px",
breakpoint: "sm",
collapsed: { desktop: uiState.hideNavbar },
}
: undefined
}>
<AppShell.Navbar>
{authState.isAuthorized && !authState.isGuest && (
@@ -42,6 +46,7 @@ const PageWrapper: FC<Props> = ({ children }) => {
}
className={styles["main-container"]}>
<div className={styles["container"]}>{children}</div>
<HideNavbarAffix />
</AppShell.Main>
</AppShell>
);