Skip to content

Commit 51e491d

Browse files
committed
Fix nav jumping on interaction, shout out to Dillon for flagging
1 parent 1c8faab commit 51e491d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app/Navigation.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use client'
2+
import { cn } from '@/lib/utils'
23
import { Box } from '@recipes/box'
34
import {
45
Drawer,
@@ -106,7 +107,15 @@ export function NavigationHeader() {
106107
function ActiveLink({ href, ...props }) {
107108
let pathname = usePathname()
108109
if (pathname === href) {
109-
return <Text {...props} />
110+
return (
111+
<p
112+
{...props}
113+
className={cn(
114+
props.className,
115+
'font-medium underline underline-offset-4 decoration-transparent',
116+
)}
117+
/>
118+
)
110119
}
111120
return (
112121
<Link

0 commit comments

Comments
 (0)