Files
explore/ui/txnBatches/zkEvmL2/ZkEvmTxnBatchesTable.tsx
Igor StuevandGitHub ebb3fb9b6f eslint default export (#2995)
* eslint default export

* fix linter error
2025-09-15 15:20:59 +02:00

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;