Files
explore/ui/addressesLabelSearch/AddressesLabelSearchTableItem.tsx

48 lines
1.1 KiB
TypeScript

import React from 'react';
import type { AddressesItem } from 'types/api/addresses';
import { Skeleton } from '@luxfi/ui/skeleton';
import { TableCell, TableRow } from '@luxfi/ui/table';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import NativeCoinValue from 'ui/shared/value/NativeCoinValue';
type Props = {
item: AddressesItem;
isLoading?: boolean;
};
const AddressesLabelSearchTableItem = ({
item,
isLoading,
}: Props) => {
return (
<TableRow>
<TableCell>
<AddressEntity
address={ item }
isLoading={ isLoading }
className="font-bold my-[2px]"
/>
</TableCell>
<TableCell isNumeric>
<NativeCoinValue
amount={ item.coin_balance }
noSymbol
loading={ isLoading }
lineHeight="24px"
/>
</TableCell>
<TableCell isNumeric>
<Skeleton loading={ isLoading } display="inline-block" lineHeight="24px">
{ Number(item.transactions_count).toLocaleString() }
</Skeleton>
</TableCell>
</TableRow>
);
};
export default React.memo(AddressesLabelSearchTableItem);