-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> | ||
|
||
|
||
<title>Justin Hoang</title> | ||
<title>Justin</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
import React from "react" | ||
import { NavLink, Link } from "react-router-dom" | ||
|
||
import React from "react"; | ||
import { NavLink, Link } from "react-router-dom"; | ||
|
||
export default function Header() { | ||
const isActiveLink= { | ||
fontWeight: "bold", | ||
color: "green" | ||
|
||
} | ||
return ( | ||
<header> | ||
<Link className = "brand-name" to = "/">truong</Link> | ||
<nav> | ||
<NavLink to = "/about" style = {({isActive}) => isActive ? isActiveLink : null }> | ||
About | ||
</NavLink> | ||
<NavLink to = "/projects" style = {({isActive}) => isActive ? isActiveLink : null } > | ||
Projects | ||
</NavLink> | ||
<NavLink to = "/contacts" style = {({isActive}) => isActive ? isActiveLink : null }> | ||
Contacts | ||
</NavLink> | ||
</nav> | ||
|
||
</header> | ||
) | ||
} | ||
const isActiveLink = { | ||
fontWeight: "bold", | ||
color: "green", | ||
}; | ||
return ( | ||
<header> | ||
<Link className="brand-name" to="/"> | ||
Justin | ||
</Link> | ||
<nav className="nav-bar"> | ||
<NavLink | ||
to="/about" | ||
style={({ isActive }) => (isActive ? isActiveLink : null)} | ||
> | ||
About | ||
</NavLink> | ||
<NavLink | ||
to="/projects" | ||
style={({ isActive }) => (isActive ? isActiveLink : null)} | ||
> | ||
Projects | ||
</NavLink> | ||
<NavLink | ||
to="/contacts" | ||
style={({ isActive }) => (isActive ? isActiveLink : null)} | ||
> | ||
Contacts | ||
</NavLink> | ||
</nav> | ||
</header> | ||
); | ||
} |