Skip to content

Commit

Permalink
fix: issue where all paths were active on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelblijleven committed Sep 29, 2023
1 parent f6973f8 commit 59f82f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/layout/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function MobileMenuItems(props: MobileMenuItemsProps) {
previousValue.push(
<li key={currentValue.label + "-separator"} className={cn("transition-all", props.open ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-24")}>
<Link
data-active={currentValue.href.includes(pathname)}
data-active={pathname !== "/" && currentValue.href.includes(pathname)}
onClick={props.onClick}
className={"w-full data-[active='true']:font-bold"} href={currentValue.href}>{currentValue.label}</Link>
</li>
Expand Down

0 comments on commit 59f82f1

Please sign in to comment.