disabled prefetch in link component and other fixes

This commit is contained in:
Ren Amamiya
2023-04-20 10:57:32 +07:00
parent 8bf3c79a0b
commit 5c01b91771
6 changed files with 18 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ export const ActiveLink = ({
const isActive = href.includes(segments[1]);
return (
<Link href={href} className={`${className}` + ' ' + (isActive ? `${activeClassName}` : '')}>
<Link prefetch={false} href={href} className={`${className}` + ' ' + (isActive ? `${activeClassName}` : '')}>
{children}
</Link>
);

View File

@@ -39,6 +39,7 @@ export default function MultiAccounts() {
<div className="flex h-full flex-col items-center justify-between px-2 pb-4 pt-3">
<div className="flex flex-col gap-4">
<Link
prefetch={false}
href="/explore"
className="group relative flex h-11 w-11 shrink cursor-pointer items-center justify-center rounded-lg bg-zinc-900 hover:bg-zinc-800"
>
@@ -46,6 +47,7 @@ export default function MultiAccounts() {
</Link>
<div>{users.map((user) => renderAccount(user))}</div>
<Link
prefetch={false}
href="/onboarding"
className="group relative flex h-11 w-11 shrink cursor-pointer items-center justify-center rounded-lg border-2 border-dashed border-zinc-600 hover:border-zinc-400"
>