Fix NavDropDown and add Logout Dropdown

This commit is contained in:
Ray 2023-10-10 09:11:56 +00:00 committed by GitHub
parent 1877daa939
commit 99c7b5f7e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import Container from "react-bootstrap/Container" import Container from "react-bootstrap/Container"
import Navbar from "react-bootstrap/Navbar" import Navbar from "react-bootstrap/Navbar"
import Nav from "react-bootstrap/Nav" import Nav from "react-bootstrap/Nav"
import { NavDropdown } from "react-bootstrap/NavDropdown" import NavDropdown from "react-bootstrap/NavDropdown"
export function Header ( props ) { export function Header ( props ) {
// props.items is the value of nav state in App.js // props.items is the value of nav state in App.js
@ -17,6 +17,9 @@ return (
<Navbar.Brand>App</Navbar.Brand> <Navbar.Brand>App</Navbar.Brand>
<Nav> <Nav>
{Links} {Links}
<NavDropdown title="Account">
<NavDropdown.Item>Log out</NavDropdown.Item>
</NavDropdown>
</Nav> </Nav>
</Container> </Container>
</Navbar>) </Navbar>)