Skip to content

Commit

Permalink
chore: centralize login layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-vm committed Mar 4, 2024
1 parent 2ddf453 commit cf7c215
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/PrivateLayout/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Box } from "@mui/material";
import { type FC, useRef, useState } from "react";
import { type FC, useState } from "react";

import { DrawerMenu } from "./drawerMenu";

export const Header: FC = () => {
const [menuOpen, setMenuOpen] = useState(false);
const barHeight = useRef<HTMLDivElement>(null);

return (
<>
<Box sx={{ height: barHeight.current?.clientHeight ?? 64 }}>
<Box sx={{ height: 64 }}>
<DrawerMenu
isOpen={menuOpen}
handleClose={() => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/PrivateLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface IPrivateLayoutProps {

export const PrivateLayout: FC<IPrivateLayoutProps> = ({ children }) => {
return (
<Box sx={{ display: "flex", width: "100%", marginTop: "3rem" }}>
<Box sx={{ display: "flex", width: "100%", marginTop: "64px" }}>
<Header />

<Container component="main" maxWidth={false} sx={{ padding: 3 }}>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/PublicLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ export const PublicLayout: FC<{ children: ReactNode }> = ({ children }) => {
<Container component="main" maxWidth="sm">
<Box
sx={{
marginTop: 8,
height: "100vh",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
}}
>
<Card variant="outlined" sx={{ padding: 2 }}>
Expand Down

0 comments on commit cf7c215

Please sign in to comment.