Skip to content

Commit 8be1137

Browse files
committed
Remove space before menu when no logo.
Also, make User hide names when extra small
1 parent 1737f45 commit 8be1137

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/Navbar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const NavLinks = ({ children }: NavLinksProps) => {
8080
sx={{
8181
height: "100%",
8282
display: { xs: "none", md: "flex" },
83+
marginLeft: "0 !important",
8384
}}
8485
component="nav"
8586
spacing={4}
@@ -148,6 +149,7 @@ const Navbar = ({ children, logo, ...props }: NavbarProps) => {
148149
maxWidth="5rem"
149150
sx={{
150151
"&:hover": { filter: "brightness(80%);" },
152+
marginRight: { xs: "0", md: "50px" },
151153
}}
152154
>
153155
<ImageColorSchemeSwitch image={logo} />

src/components/User.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ const User = ({ user, onLogin, onLogout, avatar, color }: UserProps) => {
8080
}}
8181
/>
8282
)}
83-
<div style={{ padding: 10 }}>
83+
<Box
84+
sx={{
85+
padding: "5px",
86+
display: { xs: "none", sm: "block" },
87+
}}
88+
>
8489
<Typography
8590
fontSize="0.75rem"
8691
textTransform="none"
@@ -101,7 +106,7 @@ const User = ({ user, onLogin, onLogout, avatar, color }: UserProps) => {
101106
{user.fedid}
102107
</Typography>
103108
)}
104-
</div>
109+
</Box>
105110
</Stack>
106111
</Button>
107112
{onLogout && (

0 commit comments

Comments
 (0)