Commit aeac19d3 authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #2285 from blockscout/v1351

V1351
parents 10e5e934 2ce0c41e
...@@ -110,7 +110,10 @@ const Chart = () => { ...@@ -110,7 +110,10 @@ const Chart = () => {
router.push({ router.push({
pathname: router.pathname, pathname: router.pathname,
query: { ...router.query, resolution }, query: { ...router.query, resolution },
}); },
undefined,
{ shallow: true },
);
}, [ setResolution, router ]); }, [ setResolution, router ]);
const handleReset = React.useCallback(() => { const handleReset = React.useCallback(() => {
......
import type { EntityTag } from './types'; 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 { export function getTagLinkParams(data: EntityTag): { type: 'external' | 'internal'; href: string } | undefined {
if (data.meta?.warpcastHandle) { if (data.meta?.warpcastHandle) {
...@@ -17,10 +17,10 @@ export function getTagLinkParams(data: EntityTag): { type: 'external' | 'interna ...@@ -17,10 +17,10 @@ export function getTagLinkParams(data: EntityTag): { type: 'external' | 'interna
}; };
} }
if (data.tagType === 'generic' || data.tagType === 'protocol') { // if (data.tagType === 'generic' || data.tagType === 'protocol') {
return { // return {
type: 'internal', // type: 'internal',
href: route({ pathname: '/accounts/label/[slug]', query: { slug: data.slug, tagType: data.tagType, tagName: data.name } }), // href: route({ pathname: '/accounts/label/[slug]', query: { slug: data.slug, tagType: data.tagType, tagName: data.name } }),
}; // };
} // }
} }
...@@ -106,7 +106,7 @@ const SearchBar = ({ isHomepage }: Props) => { ...@@ -106,7 +106,7 @@ const SearchBar = ({ isHomepage }: Props) => {
React.useEffect(() => { React.useEffect(() => {
handleSearchTermChange(''); handleSearchTermChange('');
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [ router.pathname ]); }, [ router.asPath?.split('?')?.[0] ]);
React.useEffect(() => { React.useEffect(() => {
const inputEl = inputRef.current; const inputEl = inputRef.current;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment