Create Sign Up and Login links in Navbar

This commit is contained in:
Ray 2023-09-05 10:21:38 +00:00 committed by GitHub
parent f9f76513d7
commit f374b056ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -10,6 +10,11 @@ import { Contact } from "./pages/Contact"
function App() {
const FBapp = initializeApp(FirebaseConfig)
// navigation array
const navItems = [
{ label: "Home", link: "/" },
]
const saySomething = ( word ) => {
alert( word )
}
@ -19,7 +24,7 @@ function App() {
<Routes>
<Route path="/" element={ <Home greeting="Hey you're at home!" /> } />
<Route path="/about" element={ <About greeting="Hey you, this is about page!" handler={saySomething} /> } />
<Route path="/contact" element={ <Contact /> } />
<Route path="/contact" element={ <Contact greeting="Hey you, this is contact page!" /> } />
</Routes>
</div>
);

View File

@ -10,6 +10,8 @@ export function Header ( props ) {
<Nav.Link href="/">Home</Nav.Link>
<Nav.Link href="/about">About</Nav.Link>
<Nav.Link href="/contact">Contact</Nav.Link>
<Nav.Link href="/signup">Create Account</Nav.Link>
<Nav.Link href="/signin">Sign in</Nav.Link>
</Nav>
</Container>
</Navbar>)