Skip to content

Commit 0fb476c

Browse files
committed
Pass full NuxtLink 'to' prop in mobile menu
1 parent ed206bb commit 0fb476c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/components/Header/MobileMenu.client.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ onUnmounted(deactivate)
197197
<NuxtLink
198198
v-for="link in group.items"
199199
:key="link.name"
200-
:to="link.to?.name"
200+
:to="link.to"
201201
:href="link.href"
202202
:target="link.target"
203203
class="flex items-center gap-3 px-3 py-3 rounded-md font-mono text-sm text-fg hover:bg-bg-subtle transition-colors duration-200"

app/types/navigation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import type { NuxtLinkProps } from '#app'
2+
13
export type NavigationLink = {
24
name: string
35
label: string
46
iconClass?: string
5-
to?: {
6-
name?: string
7-
}
7+
to?: NuxtLinkProps['to'] & { name?: string }
88
href?: string
99
target?: string
1010
keyshortcut?: string

0 commit comments

Comments
 (0)