From d1e13f9401966acdd9a0c57119969cd585eee191 Mon Sep 17 00:00:00 2001 From: martines3000 Date: Fri, 7 Jun 2024 16:17:49 +0200 Subject: [PATCH] fix: disable link prefetching in searchbar --- packages/dapp/src/app/profile/[slug]/Feed.tsx | 3 +++ packages/dapp/src/app/profile/[slug]/ShareDialog.tsx | 2 ++ packages/dapp/src/components/Navbar/Searchbar.tsx | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/packages/dapp/src/app/profile/[slug]/Feed.tsx b/packages/dapp/src/app/profile/[slug]/Feed.tsx index 01e1d0f..5a494a8 100644 --- a/packages/dapp/src/app/profile/[slug]/Feed.tsx +++ b/packages/dapp/src/app/profile/[slug]/Feed.tsx @@ -46,6 +46,7 @@ export const Feed = ({ account, platform, tab, network }: FeedProps) => { href={`?platform=${platform}&tab=dashboard`} data-state={_tab === 'dashboard' ? 'active' : ''} scroll={false} + prefetch={false} > Dashboard @@ -54,6 +55,7 @@ export const Feed = ({ account, platform, tab, network }: FeedProps) => { className="cursor-pointer inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm" data-state={_tab === 'explorer' ? 'active' : ''} scroll={false} + prefetch={false} > Endorsement Explorer 🚧 @@ -62,6 +64,7 @@ export const Feed = ({ account, platform, tab, network }: FeedProps) => { className="cursor-pointer inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm" data-state={_tab === 'graph' ? 'active' : ''} scroll={false} + prefetch={false} > Social Graph 🚧 diff --git a/packages/dapp/src/app/profile/[slug]/ShareDialog.tsx b/packages/dapp/src/app/profile/[slug]/ShareDialog.tsx index ec788b9..f5bd1a9 100644 --- a/packages/dapp/src/app/profile/[slug]/ShareDialog.tsx +++ b/packages/dapp/src/app/profile/[slug]/ShareDialog.tsx @@ -67,6 +67,7 @@ export function ShareDialog({ { setShowDropdown(false); setModalOpen(false); }} + prefetch={false} href={`/profile/${account.value}?platform=${account.platform}`} className="w-full justify-start gap-x-2 hover:bg-gray-100 inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2" > @@ -114,6 +115,7 @@ export const Searchbar = () => { setShowDropdown(false); setModalOpen(false); }} + prefetch={false} href={`/profile/${query}?platform=${PlatformType.ethereum}`} className="w-full justify-start gap-x-2 hover:bg-gray-100 inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2" > @@ -131,6 +133,7 @@ export const Searchbar = () => { Results { setShowDropdown(false); setModalOpen(false); @@ -147,6 +150,7 @@ export const Searchbar = () => { {query}.eth { setShowDropdown(false); setModalOpen(false); @@ -163,6 +167,7 @@ export const Searchbar = () => { {query}.lens { setShowDropdown(false); setModalOpen(false);