Files
tom goriunovandGitHub 932add9d96 Change zero to <0.001 value within different pages (#3150)
* basic components and address page refactoring

* second part of refactoring

* third part of refactoring

* NativeCoinValue component

* more refactoring

* rename TruncatedValue into TruncatedText

* minor fixes

* refactor block details

* fix layout of value and fee in tx table

* update screenshots

* different units for tooltip and stats widget small value fix

* update screenshots

* update tx table screenshot

* fix copy button vertical alignment
2025-12-05 16:04:27 +01:00

38 lines
1.1 KiB
TypeScript

import React from 'react';
import type { ValidatorsZilliqaItem } from 'types/api/validators';
import { Skeleton } from 'toolkit/chakra/skeleton';
import { TableCell, TableRow } from 'toolkit/chakra/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 } fontWeight="700"/>
</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);