From e69ae76f5d8853aa7cb3478575f285ade0df9756 Mon Sep 17 00:00:00 2001 From: isstuev Date: Tue, 1 Oct 2024 15:00:59 +0200 Subject: [PATCH 1/3] fix clear search on route changes --- ui/snippets/searchBar/SearchBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/snippets/searchBar/SearchBar.tsx b/ui/snippets/searchBar/SearchBar.tsx index 51bbdce9a8..98ea690ffa 100644 --- a/ui/snippets/searchBar/SearchBar.tsx +++ b/ui/snippets/searchBar/SearchBar.tsx @@ -106,7 +106,7 @@ const SearchBar = ({ isHomepage }: Props) => { React.useEffect(() => { handleSearchTermChange(''); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [ router.pathname ]); + }, [ router.asPath?.split('?')?.[0] ]); React.useEffect(() => { const inputEl = inputRef.current; From a9d18fbe74d3a5aedee4221e9720aa06c7e62d78 Mon Sep 17 00:00:00 2001 From: isstuev Date: Wed, 2 Oct 2024 17:16:02 +0200 Subject: [PATCH 2/3] shallow route change on the chart page --- ui/pages/Chart.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/pages/Chart.tsx b/ui/pages/Chart.tsx index fc5ed7b9b1..684db47170 100644 --- a/ui/pages/Chart.tsx +++ b/ui/pages/Chart.tsx @@ -110,7 +110,10 @@ const Chart = () => { router.push({ pathname: router.pathname, query: { ...router.query, resolution }, - }); + }, + undefined, + { shallow: true }, + ); }, [ setResolution, router ]); const handleReset = React.useCallback(() => { From 2ce0c41e0a2f0b0e2fc0e9e9fc2716fe2950d57e Mon Sep 17 00:00:00 2001 From: isstuev Date: Tue, 8 Oct 2024 11:58:14 +0300 Subject: [PATCH 3/3] disable tag page links --- ui/shared/EntityTags/utils.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/shared/EntityTags/utils.ts b/ui/shared/EntityTags/utils.ts index 4454d87872..8951d3b729 100644 --- a/ui/shared/EntityTags/utils.ts +++ b/ui/shared/EntityTags/utils.ts @@ -1,6 +1,6 @@ import type { EntityTag } from './types'; -import { route } from 'nextjs-routes'; +// import { route } from 'nextjs-routes'; export function getTagLinkParams(data: EntityTag): { type: 'external' | 'internal'; href: string } | undefined { if (data.meta?.warpcastHandle) { @@ -17,10 +17,10 @@ export function getTagLinkParams(data: EntityTag): { type: 'external' | 'interna }; } - if (data.tagType === 'generic' || data.tagType === 'protocol') { - return { - type: 'internal', - href: route({ pathname: '/accounts/label/[slug]', query: { slug: data.slug, tagType: data.tagType, tagName: data.name } }), - }; - } + // if (data.tagType === 'generic' || data.tagType === 'protocol') { + // return { + // type: 'internal', + // href: route({ pathname: '/accounts/label/[slug]', query: { slug: data.slug, tagType: data.tagType, tagName: data.name } }), + // }; + // } }