Skip to content

Commit

Permalink
Merge branch 'next' into jw/ecr-viewer-page
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewheeler committed Nov 20, 2024
2 parents 5b96075 + 472c2a7 commit 9f8355f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/components/NavigationLink/NavigationLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ export function NavigationLink({
onClick,
}: NavigationLinkProps) {
const pathname = usePathname();
const isActive = pathname === href;
const isActive = pathname.includes(href.toString());

return (
<Link href={href} passHref onClick={onClick}>
<Link
href={href}
passHref
onClick={onClick}
{...(isActive ? { 'aria-current': 'page' } : {})}
>
<span
className={classNames('text-white', {
underline: isActive,
Expand Down

0 comments on commit 9f8355f

Please sign in to comment.