Commit e84c232d authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #1187 from blockscout/hide-some-tabs

hide some address tabs if no content
parents c09c8433 93cecb3b
...@@ -75,7 +75,7 @@ const AddressPageContent = () => { ...@@ -75,7 +75,7 @@ const AddressPageContent = () => {
count: addressTabsCountersQuery.data?.transactions_count, count: addressTabsCountersQuery.data?.transactions_count,
component: <AddressTxs scrollRef={ tabsScrollRef }/>, component: <AddressTxs scrollRef={ tabsScrollRef }/>,
}, },
config.features.beaconChain.isEnabled ? config.features.beaconChain.isEnabled && addressTabsCountersQuery.data?.withdrawals_count ?
{ {
id: 'withdrawals', id: 'withdrawals',
title: 'Withdrawals', title: 'Withdrawals',
...@@ -108,7 +108,7 @@ const AddressPageContent = () => { ...@@ -108,7 +108,7 @@ const AddressPageContent = () => {
count: addressTabsCountersQuery.data?.coin_balances_count, count: addressTabsCountersQuery.data?.coin_balances_count,
component: <AddressCoinBalance/>, component: <AddressCoinBalance/>,
}, },
config.chain.verificationType === 'validation' ? config.chain.verificationType === 'validation' && addressTabsCountersQuery.data?.validations_count ?
{ {
id: 'blocks_validated', id: 'blocks_validated',
title: 'Blocks validated', title: 'Blocks validated',
...@@ -116,12 +116,14 @@ const AddressPageContent = () => { ...@@ -116,12 +116,14 @@ const AddressPageContent = () => {
component: <AddressBlocksValidated scrollRef={ tabsScrollRef }/>, component: <AddressBlocksValidated scrollRef={ tabsScrollRef }/>,
} : } :
undefined, undefined,
{ addressTabsCountersQuery.data?.logs_count ?
id: 'logs', {
title: 'Logs', id: 'logs',
count: addressTabsCountersQuery.data?.logs_count, title: 'Logs',
component: <AddressLogs scrollRef={ tabsScrollRef }/>, count: addressTabsCountersQuery.data?.logs_count,
}, component: <AddressLogs scrollRef={ tabsScrollRef }/>,
} :
undefined,
addressQuery.data?.is_contract ? { addressQuery.data?.is_contract ? {
id: 'contract', id: 'contract',
title: () => { title: () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment