Skip to content

Commit

Permalink
fix(web): underline headers for subroutes
Browse files Browse the repository at this point in the history
This should get simpler once we pass in children, but thats for later.
  • Loading branch information
lishaduck committed Dec 17, 2023
1 parent 111ff81 commit dec7107
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const Header: FunctionalComponent<Props> = ({ active }: Props) => {
<li>
<HeaderMenu
title={menu.name}
active={menu.href === active}
active={(active === "/" && menu.href === "/") ||
(active.startsWith(menu.href) && menu.href !== "/")}
href={menu.href}
/>
</li>
Expand Down

0 comments on commit dec7107

Please sign in to comment.