Files
pwap/pezkuwi-sdk-ui/packages/page-collator/src/Collator.tsx
T
Claude c71ddb6e0d Add Pezkuwi SDK UI - Polkadot.js Apps clone
- Clone Polkadot.js Apps repository
- Update package.json with Pezkuwi branding
- Add Pezkuwi endpoint to production chains (wss://pezkuwichain.app:9944)
- Create comprehensive README for SDK UI
- Set up project structure with all packages

Next steps:
- Apply Kurdistan colors (Kesk, Sor, Zer, Spi + Black) to UI theme
- Replace logos with Pezkuwi branding
- Test build and deployment
2025-11-14 00:55:17 +00:00

51 lines
1.3 KiB
TypeScript

// Copyright 2017-2025 @polkadot/app-collator authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Collator as CollatorType } from './types.js';
import React, { useMemo } from 'react';
import { AddressSmall, Badge, Table } from '@polkadot/react-components';
import { BalanceFree } from '@polkadot/react-query';
import { formatNumber } from '@polkadot/util';
interface Props {
className?: string;
info: CollatorType;
lastBlock?: string;
}
function Collator ({ className, info: { accountId, deposit, isInvulnerable, lastBlock: lastStateBlock }, lastBlock: lastGlobalBlock }: Props): React.ReactElement<Props> {
const lastBlock = useMemo(
() => lastStateBlock
? formatNumber(lastStateBlock)
: lastGlobalBlock,
[lastStateBlock, lastGlobalBlock]
);
return (
<tr className={className}>
<td className='badge number'>
{isInvulnerable && (
<Badge
color='green'
icon='shield'
/>
)}
</td>
<td className='address all'>
<AddressSmall value={accountId} />
</td>
<Table.Column.Balance value={deposit} />
<td className='number'>
<BalanceFree params={accountId} />
</td>
<td className='number'>
{lastBlock}
</td>
</tr>
);
}
export default React.memo(Collator);