-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changing header component to use router links
- Loading branch information
1 parent
7551049
commit e4ce4b1
Showing
2 changed files
with
34 additions
and
38 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 |
---|---|---|
@@ -1,43 +1,41 @@ | ||
import'./Header.css'; | ||
import elasticLogo from '../../assets/elastic-logo.png' | ||
import { Link } from "react-router-dom"; | ||
|
||
import "./Header.css"; | ||
import elasticLogo from "../../assets/elastic-logo.png"; | ||
|
||
function Header() { | ||
return ( | ||
<> | ||
<header className="header"> | ||
<div className="header-container"> | ||
<div className="logo"> | ||
<a href="/" title="Elastic"> | ||
<img src={elasticLogo} alt="Elastic logo" /> | ||
</a> | ||
<div className="header-container"> | ||
<div className="logo"> | ||
<Link data-testid="home-link" to={`/`} title="Elastic"> | ||
<img src={elasticLogo} alt="Elastic logo" /> | ||
</Link> | ||
</div> | ||
<ul> | ||
<li> | ||
<Link data-testid="play-link" to={`/play`} title="Elastic"> | ||
Play | ||
</Link> | ||
</li> | ||
<li> | ||
<Link data-testid="rules-link" to={`/`}> | ||
Rules | ||
</Link> | ||
</li> | ||
<li> | ||
<a data-testid="github-link" | ||
href="https://github.com/carlyrichmond/is-it-fake" | ||
target="_blank"> | ||
GitHub | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<ul> | ||
<li> | ||
<a | ||
href="/play" | ||
target="_blank"> | ||
Play | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="/rules" | ||
target="_blank"> | ||
Rules | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://github.com/carlyrichmond/is-it-fake" | ||
target="_blank"> | ||
GitHub | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</header> | ||
</header> | ||
</> | ||
) | ||
); | ||
} | ||
|
||
export default Header | ||
export default Header; |
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