mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-20 15:25:42 +00:00
971df8edba
- 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
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/app-staking authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { DeriveSessionProgress } from '@pezkuwi/api-derive/types';
|
|
import type { u32 } from '@pezkuwi/types';
|
|
import type { PezpalletNominationPoolsPoolMember } from '@pezkuwi/types/lookup';
|
|
import type { SortedTargets } from '../../types.js';
|
|
|
|
import React from 'react';
|
|
|
|
import usePoolInfo from '@pezkuwi/app-staking2/Pools/usePoolInfo';
|
|
|
|
import Account from './Account.js';
|
|
|
|
interface Props {
|
|
count: number;
|
|
className?: string;
|
|
members: Record<string, PezpalletNominationPoolsPoolMember>;
|
|
poolId: u32;
|
|
sessionProgress?: DeriveSessionProgress;
|
|
targets: SortedTargets;
|
|
}
|
|
|
|
function Pool ({ className, count, members, poolId, sessionProgress, targets }: Props): React.ReactElement<Props> | null {
|
|
const info = usePoolInfo(poolId);
|
|
|
|
if (!info) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{Object.keys(members).map((accountId, index) => (
|
|
<Account
|
|
accountId={accountId}
|
|
className={`${className || ''} ${count % 2 ? 'isEven' : 'isOdd'}`}
|
|
info={info}
|
|
isFirst={index === 0}
|
|
key={`${poolId.toString()}:${accountId}`}
|
|
poolId={poolId}
|
|
sessionProgress={sessionProgress}
|
|
targets={targets}
|
|
/>
|
|
))}
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Pool);
|