Skip to content

Commit

Permalink
Make logo in navbar clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonappah committed Feb 13, 2024
1 parent 7d05848 commit df3540a
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Link } from "react-router-dom";
import { Link as RouterLink } from "react-router-dom";

const links: { name: string; href: string }[] = [
{ name: "Home", href: "#" },
type LinkType = { name: string; href: string }
const HOME_LINK: LinkType = { name: "Home", href: "#" };
const links: LinkType[] = [
HOME_LINK,
{ name: "About", href: "#" },
{ name: "Projects", href: "#" },
{ name: "Contact", href: "#" },
Expand All @@ -25,12 +27,14 @@ function Navbar() {
"linear-gradient(180deg, rgba(0, 0, 0, 0.67) 0%, rgba(0, 0, 0, 0.00) 100%)",
}}
>
<img
src="/wordmark.png"
style={{
width: "150px",
}}
/>
<RouterLink to={HOME_LINK.href}>
<img
src="/wordmark.png"
style={{
width: "150px",
}}
/>
</RouterLink>
<nav
style={{
display: "flex",
Expand All @@ -39,7 +43,7 @@ function Navbar() {
}}
>
{links.map((link) => (
<Link key={`link-${link.name}`} to={link.href}>{link.name}</Link>
<RouterLink key={`link-${link.name}`} to={link.href}>{link.name}</RouterLink>
))}

<a
Expand Down

0 comments on commit df3540a

Please sign in to comment.