From 594c551b5c36210239492c50bb967ca94003fd91 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sat, 13 Jul 2024 15:48:27 +0330 Subject: [PATCH] scroll app --- src/app/(withAuth)/dashboard/layout.js | 8 +++----- src/app/layout.js | 2 +- .../layouts/dashboard/headerWithLogo/index.jsx | 2 +- .../layouts/dashboard/headerWithSidebar/index.jsx | 15 ++++++++++----- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/app/(withAuth)/dashboard/layout.js b/src/app/(withAuth)/dashboard/layout.js index dc77f0a..5a85c25 100644 --- a/src/app/(withAuth)/dashboard/layout.js +++ b/src/app/(withAuth)/dashboard/layout.js @@ -1,14 +1,12 @@ import HeaderWithLogo from "@/components/layouts/dashboard/headerWithLogo"; import HeaderWithSidebar from "@/components/layouts/dashboard/headerWithSidebar"; -import { Box, Stack } from "@mui/material"; +import { Stack } from "@mui/material"; const Layout = ({ children }) => { return ( - + - - {children} - + {children} ); }; diff --git a/src/app/layout.js b/src/app/layout.js index 64aea89..1f5a2c5 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -7,7 +7,7 @@ export const metadata = { export default function RootLayout({ children }) { return ( - + {children} diff --git a/src/components/layouts/dashboard/headerWithLogo/index.jsx b/src/components/layouts/dashboard/headerWithLogo/index.jsx index 16ef4b2..2d0b7bc 100644 --- a/src/components/layouts/dashboard/headerWithLogo/index.jsx +++ b/src/components/layouts/dashboard/headerWithLogo/index.jsx @@ -4,7 +4,7 @@ import HeaderBottom from "./HaederBottom"; const HeaderWithLogo = () => { return ( - + diff --git a/src/components/layouts/dashboard/headerWithSidebar/index.jsx b/src/components/layouts/dashboard/headerWithSidebar/index.jsx index c8febb6..931cde2 100644 --- a/src/components/layouts/dashboard/headerWithSidebar/index.jsx +++ b/src/components/layouts/dashboard/headerWithSidebar/index.jsx @@ -2,15 +2,16 @@ import SidebarMenu from "@/core/components/SidebarMenu"; import ChevronRightIcon from "@mui/icons-material/ChevronRight"; import MenuIcon from "@mui/icons-material/Menu"; -import { Box, Drawer, IconButton, Paper, styled, Toolbar } from "@mui/material"; +import { Box, Drawer, IconButton, Paper, Stack, styled, Toolbar } from "@mui/material"; import MuiAppBar from "@mui/material/AppBar"; import { useState } from "react"; import HeaderMenu from "./HeaderMenu"; const drawerWidth = 300; -const Main = styled(Paper, { shouldForwardProp: (prop) => prop !== "open" })(({ theme, open }) => ({ +const Main = styled(Stack, { shouldForwardProp: (prop) => prop !== "open" })(({ theme, open }) => ({ flexGrow: 1, + height: '100%', transition: theme.transitions.create("margin", { easing: theme.transitions.easing.sharp, duration: theme.transitions.duration.leavingScreen, @@ -47,6 +48,7 @@ const DrawerHeader = styled("div")(({ theme }) => ({ alignItems: "center", padding: theme.spacing(0, 1), ...theme.mixins.toolbar, + minHeight: '48px !important', justifyContent: "flex-end", })); @@ -60,7 +62,7 @@ const HeaderWithSidebar = ({ children }) => { setOpen(false); }; return ( - + { { -
+
- {children} + + {children} +
);