diff --git a/packages/page-staking/src/Overview/Address/index.tsx b/packages/page-staking/src/Overview/Address/index.tsx index 19a1a11cf4..0afedfeed6 100644 --- a/packages/page-staking/src/Overview/Address/index.tsx +++ b/packages/page-staking/src/Overview/Address/index.tsx @@ -8,7 +8,7 @@ import type { SlashingSpans, ValidatorPrefs } from '@polkadot/types/interfaces'; import type { NominatedBy as NominatedByType, ValidatorInfo } from '../../types'; import type { NominatorValue } from './types'; -import React, { useCallback, useMemo } from 'react'; +import React, { useMemo } from 'react'; import { ApiPromise } from '@polkadot/api'; import { AddressSmall, Icon, LinkExternal } from '@polkadot/react-components'; @@ -100,10 +100,8 @@ function Address ({ address, className = '', filterName, hasQueries, isElected, [api, accountInfo, address, filterName, withIdentity] ); - const _onQueryStats = useCallback( - (): void => { - window.location.hash = `/staking/query/${address}`; - }, + const statsLink = useMemo( + () => `#/staking/query/${address}`, [address] ); @@ -168,11 +166,12 @@ function Address ({ address, className = '', filterName, hasQueries, isElected, )} {hasQueries && ( - + + + )}