Files
pezkuwi-apps/packages/page-council/src/Overview/Members.tsx
T
pezkuwichain d21bfb1320 feat: initial Pezkuwi Apps rebrand from polkadot-apps
Rebranded terminology:
- Polkadot → Pezkuwi
- Kusama → Dicle
- Westend → Zagros
- Rococo → PezkuwiChain
- Substrate → Bizinikiwi
- parachain → teyrchain

Custom logos with Kurdistan brand colors (#e6007a → #86e62a):
- bizinikiwi-hexagon.svg
- sora-bizinikiwi.svg
- hezscanner.svg
- heztreasury.svg
- pezkuwiscan.svg
- pezkuwistats.svg
- pezkuwiassembly.svg
- pezkuwiholic.svg
2026-01-07 13:05:27 +03:00

51 lines
1.4 KiB
TypeScript

// Copyright 2017-2025 @pezkuwi/app-council authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DeriveElectionsInfo } from '@pezkuwi/api-derive/types';
import type { AccountId } from '@pezkuwi/types/interfaces';
import React, { useRef } from 'react';
import { Table } from '@pezkuwi/react-components';
import { useTranslation } from '../translate.js';
import Candidate from './Candidate.js';
interface Props {
allVotes?: Record<string, AccountId[]>;
className?: string;
electionsInfo?: DeriveElectionsInfo;
hasElections: boolean;
prime?: AccountId | null;
}
function Members ({ allVotes = {}, className = '', electionsInfo, hasElections, prime }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([
[t('members'), 'start', 2]
]);
return (
<Table
className={className}
empty={electionsInfo && t('No members found')}
header={headerRef.current}
isSplit
>
{electionsInfo?.members.map(([accountId, balance]): React.ReactNode => (
<Candidate
address={accountId}
balance={balance}
hasElections={hasElections}
isPrime={prime?.eq(accountId)}
key={accountId.toString()}
voters={allVotes[accountId.toString()]}
/>
))}
</Table>
);
}
export default React.memo(Members);