Files
explore/ui/crossChain/address/AddressTxsCrossChain.tsx
tom goriunovandGitHub e6e83ee4e7 Add cross-chain transaction tracking and visualization (#3227)
* envs and feature setup

* home page layout

* cross-chain txs page

* cross-chain transfers page

* cross-chain transfers on tx page

* cross-chain messages on tx page

* cross-chain tx page

* cross-chain tx details token transfers

* stats and counters for lists

* migrate to new API version

* add swagger

* mobile lists

* placeholder views on address page

* tests

* fix adaptive tabs initial state when there is only one tab in the list

* tweaks

* bug fixes

* fix tests

* update screenshots

* migrate to new api version

* add chain label tooltip, copy button to txs in lists and same address highlight

* list views on address page

* fix tests

* fix links to current address in the list views

* update tooltips

* update tables layout

* review fixes

* fix spelling

* update screenshots

* update screenshot
2026-02-19 15:14:32 +01:00

44 lines
1.4 KiB
TypeScript

import React from 'react';
import useIsMobile from 'lib/hooks/useIsMobile';
import useTableViewValue from 'lib/hooks/useTableViewValue';
import ActionBar from 'ui/shared/ActionBar';
import Pagination from 'ui/shared/pagination/Pagination';
import TableViewToggleButton from 'ui/shared/TableViewToggleButton';
import type { Props } from '../txs/TransactionsCrossChainContent';
import TransactionsCrossChainContent from '../txs/TransactionsCrossChainContent';
const AddressCrossChainTxs = ({ pagination, isLoading: isLoadingProp, ...rest }: Props) => {
const isMobile = useIsMobile();
const tableViewFlag = useTableViewValue();
const isTableView = isMobile ? !tableViewFlag.isLoading && tableViewFlag.value : true;
const isLoading = isLoadingProp || tableViewFlag.isLoading;
return (
<>
{ isMobile && (
<ActionBar>
<TableViewToggleButton
value={ tableViewFlag.value }
onClick={ tableViewFlag.onToggle }
loading={ isLoading }
/>
{ pagination?.isVisible && <Pagination { ...pagination } ml="auto"/> }
</ActionBar>
) }
<TransactionsCrossChainContent
pagination={ pagination }
isLoading={ isLoading }
isTableView={ isTableView }
stickyHeader={ !isMobile && isTableView }
{ ...rest }
/>
</>
);
};
export default React.memo(AddressCrossChainTxs);