fix: proper prefetch

This commit is contained in:
ner committed 2024-10-29 19:39:41 +02:00
1 parent c9ca262da8
commit 3b954279f7
9 files changed
+12 -15

No files matched your search

@@ -25,7 +25,7 @@ export const MobileNavigation = () => {
<DropdownMenuContent className='flex w-44 flex-col gap-2 p-2'>
{paths.map(({ path, title }) => (
<DropdownMenuItem key={path} asChild>
<Link href={path}>
<Link href={path} prefetch={path !== '/'}>
<div>
<Button className='relative w-full' variant={currentPath === path ? 'default' : 'outline'}>
{title}
@@ -47,7 +47,7 @@ export const DesktopNavigation = () => {
return (
<Nav tabs={paths} active={active || paths[0]}>
{({ path, title }) => (
<Link href={path}>
<Link href={path} prefetch={path !== '/'}>
<div>{title}</div>
</Link>
)}