From 280f079816d092c4b320c8ed7b6760ce9f1fa271 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Wed, 31 Jan 2024 13:15:39 +0100 Subject: [PATCH] Show view all link only for ERC721 tokens --- .changelog/1210.bugfix.md | 1 + .../AccountDetailsPage/AccountTokensCard.tsx | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changelog/1210.bugfix.md diff --git a/.changelog/1210.bugfix.md b/.changelog/1210.bugfix.md new file mode 100644 index 000000000..0d03a4c5a --- /dev/null +++ b/.changelog/1210.bugfix.md @@ -0,0 +1 @@ +Show view all link only for ERC721 tokens diff --git a/src/app/pages/AccountDetailsPage/AccountTokensCard.tsx b/src/app/pages/AccountDetailsPage/AccountTokensCard.tsx index 80cc3e8e5..ee535c307 100644 --- a/src/app/pages/AccountDetailsPage/AccountTokensCard.tsx +++ b/src/app/pages/AccountDetailsPage/AccountTokensCard.tsx @@ -94,15 +94,19 @@ export const AccountTokensCard: FC = ({ scope, account, content: item.token_symbol || t('common.missing'), key: 'ticker', }, - { - align: TableCellAlign.Right, - key: 'link', - content: ( - - {t('common.viewAll')} - - ), - }, + ...(isERC721 + ? [ + { + align: TableCellAlign.Right, + key: 'link', + content: ( + + {t('common.viewAll')} + + ), + }, + ] + : []), ], highlight: item.token_contract_addr_eth === locationHash || item.token_contract_addr === locationHash, }))