Skip to content

Commit

Permalink
fix: add link check for root page
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 8, 2024
1 parent 352f5fd commit 2309ab7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/components/NavLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export function NavLink({
className={cn(
!unStyled
? navlinkVariants({
active: !hideActiveIndicator && pathname.startsWith(href),
active:
!hideActiveIndicator && href.length > 1
? pathname.startsWith(href)
: pathname === href,
className,
})
: className
Expand Down

0 comments on commit 2309ab7

Please sign in to comment.