mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { ValidatorsZilliqaItem } from 'types/api/validators';
|
|
|
|
import { Skeleton } from '@luxfi/ui/skeleton';
|
|
import { TableCell, TableRow } from '@luxfi/ui/table';
|
|
import ValidatorEntity from 'ui/shared/entities/validator/ValidatorEntity';
|
|
import NativeCoinValue from 'ui/shared/value/NativeCoinValue';
|
|
|
|
interface Props {
|
|
data: ValidatorsZilliqaItem;
|
|
isLoading?: boolean;
|
|
}
|
|
|
|
const ValidatorsTableItem = ({ data, isLoading }: Props) => {
|
|
return (
|
|
<TableRow>
|
|
<TableCell verticalAlign="middle">
|
|
<ValidatorEntity id={ data.bls_public_key } isLoading={ isLoading } className="font-bold"/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<Skeleton loading={ isLoading } display="inline-block">
|
|
{ data.index }
|
|
</Skeleton>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle" isNumeric>
|
|
<NativeCoinValue
|
|
amount={ data.balance }
|
|
loading={ isLoading }
|
|
noSymbol
|
|
/>
|
|
</TableCell>
|
|
</TableRow>
|
|
);
|
|
};
|
|
|
|
export default React.memo(ValidatorsTableItem);
|