debug: add prefetch=false to logout link

This commit is contained in:
Arvid Norlin
2024-05-24 10:48:45 +02:00
parent 506922cbe9
commit f2b8ddae8e
3 changed files with 11 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ export default async function Sidebar({ lang }: LangParams) {
</Fragment>
))}
<Link href={logout[lang]} variant="sidebar">
<Link prefetch={false} href={logout[lang]} variant="sidebar">
Log out <LogOut height={16} width={16} />
</Link>
</nav>

View File

@@ -11,6 +11,7 @@ export default function Link({
href,
partialMatch = false,
size,
prefetch,
variant,
...props
}: LinkProps) {
@@ -25,5 +26,12 @@ export default function Link({
size,
variant,
})
return <NextLink className={classNames} href={href} {...props} />
return (
<NextLink
prefetch={prefetch}
className={classNames}
href={href}
{...props}
/>
)
}

View File

@@ -7,4 +7,5 @@ export interface LinkProps
VariantProps<typeof linkVariants> {
href: string
partialMatch?: boolean
prefetch?: boolean
}