Skip to content

Commit

Permalink
Merge pull request #1187 from blockscout/hide-some-tabs
Browse files Browse the repository at this point in the history
hide some address tabs if no content
  • Loading branch information
isstuev authored Sep 20, 2023
2 parents c09c843 + 93cecb3 commit e84c232
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 @@ -75,7 +75,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 @@ -108,20 +108,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 e84c232

Please sign in to comment.