mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
70 lines
2.0 KiB
TypeScript
70 lines
2.0 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { ShibariumDepositsItem } from 'types/api/shibarium';
|
|
|
|
import config from 'configs/app';
|
|
import { TableCell, TableRow } from '@luxfi/ui/table';
|
|
import AddressStringOrParam from 'ui/shared/entities/address/AddressStringOrParam';
|
|
import BlockEntityL1 from 'ui/shared/entities/block/BlockEntityL1';
|
|
import TxEntity from 'ui/shared/entities/tx/TxEntity';
|
|
import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1';
|
|
import TimeWithTooltip from 'ui/shared/time/TimeWithTooltip';
|
|
|
|
const feature = config.features.rollup;
|
|
|
|
type Props = { item: ShibariumDepositsItem; isLoading?: boolean };
|
|
|
|
const DepositsTableItem = ({ item, isLoading }: Props) => {
|
|
|
|
if (!(feature.isEnabled && feature.type === 'shibarium')) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<TableRow>
|
|
<TableCell verticalAlign="middle">
|
|
<BlockEntityL1
|
|
number={ item.l1_block_number }
|
|
isLoading={ isLoading }
|
|
className="text-sm font-semibold"
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<TxEntityL1
|
|
isLoading={ isLoading }
|
|
hash={ item.l1_transaction_hash }
|
|
truncation="constant_long"
|
|
className="text-sm"
|
|
noCopy
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<TxEntity
|
|
isLoading={ isLoading }
|
|
hash={ item.l2_transaction_hash }
|
|
className="text-sm"
|
|
truncation="constant_long"
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<AddressStringOrParam
|
|
address={ item.user }
|
|
isLoading={ isLoading }
|
|
truncation="constant"
|
|
noCopy
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle" pr={ 12 }>
|
|
<TimeWithTooltip
|
|
timestamp={ item.timestamp }
|
|
isLoading={ isLoading }
|
|
color="text.secondary"
|
|
display="inline-block"
|
|
/>
|
|
</TableCell>
|
|
</TableRow>
|
|
);
|
|
};
|
|
|
|
export default DepositsTableItem;
|