Skip to content

Commit

Permalink
Prevent changing scroll position during navigation between collections
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Dec 1, 2023
1 parent adb975a commit 391ade5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app/pages/AccountDetailsPage/AccountNFTCollectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { EvmNft } from 'oasis-nexus/api'
import { SearchScope } from '../../../types/searchScope'
import { NFTCollectionLink, NFTInstanceLink } from '../TokenDashboardPage/NFTLinks'

export const accountTokenContainerId = 'nftCollection'
export const accountNFTCollectionContainerId = 'nftCollection'

export const AccountNFTCollectionCard: FC<AccountDetailsContext> = ({ scope, address }) => {
const { t } = useTranslation()
Expand All @@ -55,8 +55,9 @@ export const AccountNFTCollectionCard: FC<AccountDetailsContext> = ({ scope, add
<Breadcrumbs separator="›" aria-label="breadcrumb">
<Typography fontSize={24}>
<Link
preventScrollReset={true}
component={RouterLink}
to={RouteUtils.getAccountTokensRoute(scope, address, 'ERC721', ethContractAddress)}
to={RouteUtils.getAccountTokensRoute(scope, address, 'ERC721', '')}
>
{t('nft.accountCollection')}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/AccountDetailsPage/AccountTokensCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const AccountTokensCard: FC<AccountTokensCardProps> = ({ scope, address,
align: TableCellAlign.Right,
key: 'link',
content: (
<Link component={RouterLink} to={item.token_contract_addr_eth}>
<Link component={RouterLink} to={item.token_contract_addr_eth} preventScrollReset={true}>
{t('common.viewAll')}
</Link>
),
Expand Down

0 comments on commit 391ade5

Please sign in to comment.