Skip to content

Commit

Permalink
fix: header overflow (#980)
Browse files Browse the repository at this point in the history
fixes a bug introduced by a previous "fix"
  • Loading branch information
saintnoodle authored Dec 12, 2023
1 parent 5a15093 commit 0114f10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions client/src/components/layout/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext, useEffect, useState } from "react";
import { Link } from "react-router-dom";
import Container from "react-bootstrap/Container";
import { Navbar, Offcanvas, OffcanvasHeader } from "react-bootstrap";
import { Navbar, Offcanvas } from "react-bootstrap";
import SiteWordmark from "components/util/SiteWordmark";
import SignOut from "components/util/SignOut";
import { UserContext } from "context/UserContext";
Expand Down Expand Up @@ -44,25 +44,25 @@ export default function Header({ styles }: { styles: LayoutStyles }) {
show={showMobileMenu}
onHide={() => setShowMobileMenu(false)}
>
<OffcanvasHeader className="p-4 border-bottom border-body-tertiary">
<Offcanvas.Header className="p-4 border-bottom border-body-tertiary">
<Link
id="home"
to="/"
className="mx-auto p-2 focus-visible-ring rounded"
>
<SiteWordmark id="navbar-label" width="192px" />
</Link>
</OffcanvasHeader>
</Offcanvas.Header>
<Offcanvas.Body className="d-flex flex-column">
<HeaderMenu
user={user}
dropdownMenuStyle={dropdownMenuStyle}
setState={setState}
/>
<div className="pb-4 px-4 d-md-none">
<SignOut className="w-100" />
</div>
</Offcanvas.Body>
<div className="d-flex bottom-0 pb-2 px-4 d-lg-none">
<SignOut className="w-100" />
</div>
</Navbar.Offcanvas>
<UserArea user={user} dropdownMenuStyle={dropdownMenuStyle} />
</Container>
Expand Down
5 changes: 1 addition & 4 deletions client/src/components/layout/header/HeaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ export function HeaderMenu({
}, [error, data]);

return (
<Nav
as="nav"
className="p-4 d-flex align-content-between gap-4 h-100 overflow-y-auto overflow-x-hidden"
>
<Nav as="nav" className="p-4 d-flex align-content-between gap-4 h-100">
{user && ugs && ugs.length !== 0 && (
<UGPTDropdown
user={user}
Expand Down

0 comments on commit 0114f10

Please sign in to comment.