mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-19 18:11:07 +00:00
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
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
// 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);
|
||||
Reference in New Issue
Block a user