// 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; className?: string; electionsInfo?: DeriveElectionsInfo; hasElections: boolean; prime?: AccountId | null; } function Members ({ allVotes = {}, className = '', electionsInfo, hasElections, prime }: Props): React.ReactElement { const { t } = useTranslation(); const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([ [t('members'), 'start', 2] ]); return ( {electionsInfo?.members.map(([accountId, balance]): React.ReactNode => ( ))}
); } export default React.memo(Members);