Files
explore/ui/pages/ZetaChainCCTX.tsx
enochleeandGitHub 4c78f91771 display copy button for tx hashes in relevant components (#3031)
* default TxEntity.noCopy to false
remove redundant noCopy=false
restore noCopy for tx hashes in this components

This commit has no essential change, order than defaulting noCopy for TxEntity to false, and reversing the use of the prop

* To reflect new default of TxEntity and UserOpEntity

Updated tests to with-no-copy from with-copy
remove outdated screenshots
Regenerate screenshot for new default

* display copy button for tx hash

In the following pages:
/txs, /internal-txs
/token-transfers
/address/txs, /address/token-transfers(tab)
/deposits, /withdrawals
/batches[id]/txs(tab)
/advanced-filter

* update snapshots

* update snapshots
2025-10-21 17:28:01 +02:00

40 lines
1.2 KiB
TypeScript

import { useRouter } from 'next/router';
import React from 'react';
import useApiQuery from 'lib/api/useApiQuery';
import throwOnResourceLoadError from 'lib/errors/throwOnResourceLoadError';
import getQueryParamString from 'lib/router/getQueryParamString';
import { ZETA_CHAIN_CCTX } from 'stubs/zetaChainCCTX';
import TextAd from 'ui/shared/ad/TextAd';
import TxEntityZetaChainCC from 'ui/shared/entities/tx/TxEntityZetaChainCC';
import PageTitle from 'ui/shared/Page/PageTitle';
import ZetaChainCCTXDetails from 'ui/zetaChain/cctxDetails/ZetaChainCCTXDetails';
const ZetaChainCCTX = () => {
const router = useRouter();
const hash = getQueryParamString(router.query.hash);
const cctxQuery = useApiQuery('zetachain:transaction', {
queryParams: { cctx_id: hash },
queryOptions: {
placeholderData: ZETA_CHAIN_CCTX,
},
});
throwOnResourceLoadError(cctxQuery);
return (
<>
<TextAd mb={ 6 }/>
<PageTitle
title="Cross-chain tx details"
secondRow={ <TxEntityZetaChainCC hash={ hash } noLink variant="subheading" mr={{ base: 0, lg: 2 }}/> }
/>
<ZetaChainCCTXDetails data={ cctxQuery.data } isLoading={ cctxQuery.isPlaceholderData }/>
</>
);
};
export default ZetaChainCCTX;