mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-11-04 15:51:07 +00:00
- Remove all 3rd party parachain configurations from endpoints: - productionRelayPolkadot.ts: Keep only system parachains - productionRelayDicle.ts: Keep only system parachains - testingRelayZagros.ts: Keep only system parachains - testingRelayTeyrChain.ts: Keep only system parachains - Update domain references: - polkadot.js.org → pezkuwichain.app - wiki.polkadot.network → wiki.pezkuwichain.io - dotapps.io → pezkuwichain.app - statement.polkadot.network → docs.pezkuwichain.io/statement - support.polkadot.network → docs.pezkuwichain.io - Update repository references: - github.com/pezkuwi-js/apps → github.com/pezkuwichain/pwap - Rename system parachains to Pezkuwi ecosystem: - PolkadotAssetHub → PezkuwiAssetHub - polkadotBridgeHub → pezkuwiBridgeHub - polkadotCollectives → pezkuwiCollectives - polkadotCoretime → pezkuwiCoretime - polkadotPeople → pezkuwiPeople - Update network name in claims utility: - Polkadot → Pezkuwi
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/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 '@pezkuwi/react-components';
|
|
import { BalanceFree } from '@pezkuwi/react-query';
|
|
import { formatNumber } from '@pezkuwi/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);
|