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

Merge pull request #1807 from blockscout/blob-config-tabs

show block and tx blob tabs only if NEXT_PUBLIC_DATA_AVAILABILITY_ENA…
parents b486d8ca 2b74c070
......@@ -66,7 +66,7 @@ const BlockPageContent = () => {
</>
),
},
blockQuery.data?.blob_tx_count ?
config.features.dataAvailability.isEnabled && blockQuery.data?.blob_tx_count ?
{
id: 'blob_txs',
title: 'Blob txns',
......
......@@ -63,7 +63,7 @@ const TransactionPageContent = () => {
{ id: 'user_ops', title: 'User operations', component: <TxUserOps txQuery={ txQuery }/> } :
undefined,
{ id: 'internal', title: 'Internal txns', component: <TxInternals txQuery={ txQuery }/> },
txQuery.data?.blob_versioned_hashes?.length ?
config.features.dataAvailability.isEnabled && txQuery.data?.blob_versioned_hashes?.length ?
{ id: 'blobs', title: 'Blobs', component: <TxBlobs txQuery={ txQuery }/> } :
undefined,
{ id: 'logs', title: 'Logs', component: <TxLogs txQuery={ txQuery }/> },
......
......@@ -29,12 +29,6 @@ const Transactions = () => {
const isMobile = useIsMobile();
const tab = getQueryParamString(router.query.tab);
React.useEffect(() => {
if (tab === 'blob_txs' && !config.features.dataAvailability.isEnabled) {
router.replace({ pathname: '/txs' }, undefined, { shallow: true });
}
}, [ router, tab ]);
const txsValidatedQuery = useQueryWithPages({
resourceName: 'txs_validated',
filters: { filter: 'validated' },
......
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