Skip to content

Commit

Permalink
hide some address tabs if no content
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Sep 19, 2023
1 parent be950a9 commit 49c5e3f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ui/pages/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const AddressPageContent = () => {
count: addressTabsCountersQuery.data?.transactions_count,
component: <AddressTxs scrollRef={ tabsScrollRef }/>,
},
config.features.beaconChain.isEnabled ?
config.features.beaconChain.isEnabled && addressTabsCountersQuery.data?.withdrawals_count ?
{
id: 'withdrawals',
title: 'Withdrawals',
Expand Down Expand Up @@ -105,20 +105,22 @@ const AddressPageContent = () => {
count: addressTabsCountersQuery.data?.coin_balances_count,
component: <AddressCoinBalance/>,
},
config.chain.verificationType === 'validation' ?
config.chain.verificationType === 'validation' && addressTabsCountersQuery.data?.validations_count ?
{
id: 'blocks_validated',
title: 'Blocks validated',
count: addressTabsCountersQuery.data?.validations_count,
component: <AddressBlocksValidated scrollRef={ tabsScrollRef }/>,
} :
undefined,
{
id: 'logs',
title: 'Logs',
count: addressTabsCountersQuery.data?.logs_count,
component: <AddressLogs scrollRef={ tabsScrollRef }/>,
},
addressTabsCountersQuery.data?.logs_count ?
{
id: 'logs',
title: 'Logs',
count: addressTabsCountersQuery.data?.logs_count,
component: <AddressLogs scrollRef={ tabsScrollRef }/>,
} :
undefined,
addressQuery.data?.is_contract ? {
id: 'contract',
title: () => {
Expand Down

0 comments on commit 49c5e3f

Please sign in to comment.