mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { ZkEvmL2TxnBatchesItem } from 'types/api/zkEvmL2';
|
|
|
|
import { TableBody, TableColumnHeader, TableHeaderSticky, TableRoot, TableRow } from 'toolkit/chakra/table';
|
|
import TimeFormatToggle from 'ui/shared/time/TimeFormatToggle';
|
|
|
|
import ZkEvmTxnBatchesTableItem from './ZkEvmTxnBatchesTableItem';
|
|
|
|
type Props = {
|
|
items: Array<ZkEvmL2TxnBatchesItem>;
|
|
top: number;
|
|
isLoading?: boolean;
|
|
};
|
|
|
|
const ZkEvmTxnBatchesTable = ({ items, top, isLoading }: Props) => {
|
|
return (
|
|
<TableRoot minW="1100px">
|
|
<TableHeaderSticky top={ top }>
|
|
<TableRow>
|
|
<TableColumnHeader width="40%">Batch #</TableColumnHeader>
|
|
<TableColumnHeader width="60%">Status</TableColumnHeader>
|
|
<TableColumnHeader width="180px">
|
|
Timestamp
|
|
<TimeFormatToggle/>
|
|
</TableColumnHeader>
|
|
<TableColumnHeader width="100px">Txn count</TableColumnHeader>
|
|
<TableColumnHeader width="230px">Verify tx hash</TableColumnHeader>
|
|
<TableColumnHeader width="230px">Sequence hash</TableColumnHeader>
|
|
</TableRow>
|
|
</TableHeaderSticky>
|
|
<TableBody>
|
|
{ items.map((item, index) => (
|
|
<ZkEvmTxnBatchesTableItem
|
|
key={ item.number + (isLoading ? String(index) : '') }
|
|
item={ item }
|
|
isLoading={ isLoading }
|
|
/>
|
|
)) }
|
|
</TableBody>
|
|
</TableRoot>
|
|
);
|
|
};
|
|
|
|
export default ZkEvmTxnBatchesTable;
|