mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* 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
40 lines
1.2 KiB
TypeScript
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;
|