Skip to content

Commit

Permalink
Fix WrapperDiv, Foot, and Navbar (#564)
Browse files Browse the repository at this point in the history
Fixed bugs associated with WrapperDiv, Footer, and Navbar components
  • Loading branch information
nwm516 authored Dec 5, 2024
1 parent 25b0810 commit f64db7a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
15 changes: 13 additions & 2 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,22 @@ export default function Navbar() {
</Box>
<Box sx={{ display: { xs: "none", md: "block" } }}>
<Grid container spacing={1}>
<Grid item sx={{ display: "flex" }}>
<Grid item sx={{
display: "flex",
flexShrink: 0,
alignItems: "center",
marginRight: "1rem",
}}
>
<CategoryDropDownMenu />
</Grid>
{isAuth && user && (user.role === "admin" || user.role === "creator") && (
<Grid item>
<Grid item sx={{
flexShrink: 0,
alignItems: "center",
marginLeft: "1rem",
}}
>
<Link href="/dashboard" passHref>
<Button sx={{ color: "primary.contrastText" }}>
Dashboard
Expand Down
31 changes: 16 additions & 15 deletions components/WrapperDiv.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import React from "react";
import { Box, BoxProps } from "@mui/material";

const styles = {
borderRadius: "0.5rem",
width: "100%",
height: "100%",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
gap: "1rem",
textAlign: "center",
paddingBottom: 5
};

const CustomCardContent: React.FC<BoxProps> = ({ children }) => {
return <Box sx={styles}>{children}</Box>;
const CustomCardContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<Box
sx={{
minHeight: "100vh",
display: "flex",
flexDirection: "column",
justifyContent: "flex-start",
alignItems: "center",
width: "100%",
padding: "1rem",
}}
>
{children}
</Box>
);
};

export default CustomCardContent;

0 comments on commit f64db7a

Please sign in to comment.