Remove unnecessary code from Header.js

This commit is contained in:
Ray 2024-01-17 13:16:16 +00:00 committed by GitHub
parent 7de200e48c
commit 41aceb7814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 19 deletions

View File

@ -10,23 +10,7 @@ export function Header(props) {
<Nav.Link href={item.link} key={itemkey}> {item.label} </Nav.Link> <Nav.Link href={item.link} key={itemkey}> {item.label} </Nav.Link>
) )
}) })
// component for Account
const Account = (props) => {
if (props.user) {
return (
<Account user={ props.user } />
// this caused an absolute mindfuck
// <NavDropdown title="Account">
// <NavDropdown.Item href="/signout">Log out</NavDropdown.Item>
// </NavDropdown>
)
}
else {
return null
}
}
return ( return (
// create a navigation bar with the collection of navigation items, display as black bar with "ClassName" and variant" // create a navigation bar with the collection of navigation items, display as black bar with "ClassName" and variant"
<Navbar className="mb-3 bg-dark" variant="dark"> <Navbar className="mb-3 bg-dark" variant="dark">
@ -34,8 +18,8 @@ export function Header(props) {
<Navbar.Brand>systie</Navbar.Brand> <Navbar.Brand>systie</Navbar.Brand>
<Nav> <Nav>
{Links} {Links}
</Nav> </Nav>
</Container> </Container>
</Navbar>) </Navbar>
)
} }