Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: header overflow #980

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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