mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* fail the app start if multichain config or essential dapps config were not generated properly * add timeouts for essential dapps and multichain config generators * fix "add to wallet" button in address tokens table * [skip ci] update docs * fix tx tables when there are no fee and value columns * add support for promoted multichain provider * fixes * change action button logic * fix tests * fix * hide "add network" button for multichain * shorten the amount of txs on multichain homepage * change name formatting for multichain button * add bright color variants and lg size for badges * fix y-axis margin calculation for chart with custom tick formatter * superchain bug fixes * bump versions of react and nextjs * update screenshot * bump dappscout-iframe --------- Co-authored-by: Max Alekseenko <[email protected]>
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { TokenTransfer } from 'types/api/tokenTransfer';
|
|
import type { ClusterChainConfig } from 'types/multichain';
|
|
|
|
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
|
|
import { TableBody, TableColumnHeader, TableHeaderSticky, TableRoot, TableRow } from 'toolkit/chakra/table';
|
|
import TimeFormatToggle from 'ui/shared/time/TimeFormatToggle';
|
|
import TokenTransferTableItem from 'ui/tokenTransfers/TokenTransfersTableItem';
|
|
|
|
interface Props {
|
|
items?: Array<TokenTransfer>;
|
|
top: number;
|
|
isLoading?: boolean;
|
|
chainData?: ClusterChainConfig;
|
|
}
|
|
|
|
const TokenTransferTable = ({ items, top, isLoading, chainData }: Props) => {
|
|
return (
|
|
<AddressHighlightProvider>
|
|
<TableRoot minW="950px" tableLayout="auto">
|
|
<TableHeaderSticky top={ top }>
|
|
<TableRow>
|
|
{ chainData && <TableColumnHeader width="38px"/> }
|
|
<TableColumnHeader>
|
|
Txn hash
|
|
<TimeFormatToggle/>
|
|
</TableColumnHeader>
|
|
<TableColumnHeader>Method</TableColumnHeader>
|
|
<TableColumnHeader>Block</TableColumnHeader>
|
|
<TableColumnHeader>From/To</TableColumnHeader>
|
|
<TableColumnHeader>Token ID</TableColumnHeader>
|
|
<TableColumnHeader isNumeric>Amount</TableColumnHeader>
|
|
</TableRow>
|
|
</TableHeaderSticky>
|
|
<TableBody>
|
|
{ items?.map((item, index) => (
|
|
<TokenTransferTableItem
|
|
key={ item.transaction_hash + item.log_index + (isLoading ? index : '') + (chainData ? chainData.id : '') }
|
|
item={ item }
|
|
isLoading={ isLoading }
|
|
chainData={ chainData }
|
|
/>
|
|
)) }
|
|
</TableBody>
|
|
</TableRoot>
|
|
</AddressHighlightProvider>
|
|
);
|
|
};
|
|
|
|
export default React.memo(TokenTransferTable);
|