mirror of
https://github.com/pezkuwichain/pezkuwi-sdk-ui.git
synced 2026-06-17 14:51:16 +00:00
d949863789
Comprehensive web interface for interacting with Pezkuwi blockchain. Features: - Blockchain explorer - Wallet management - Staking interface - Governance participation - Developer tools Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/app-tech-comm authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import React, { useRef } from 'react';
|
|
|
|
import { AddressSmall, Table, Tag } from '@pezkuwi/react-components';
|
|
|
|
import { useTranslation } from '../translate.js';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
members?: string[];
|
|
prime?: string | null;
|
|
}
|
|
|
|
function Members ({ className = '', members, prime }: Props): React.ReactElement<Props> {
|
|
const { t } = useTranslation();
|
|
|
|
const headerRef = useRef<[React.ReactNode?, string?, number?][]>([
|
|
[t('members'), 'start', 3]
|
|
]);
|
|
|
|
return (
|
|
<Table
|
|
className={className}
|
|
empty={members && t('No members found')}
|
|
header={headerRef.current}
|
|
isSplit
|
|
>
|
|
{members?.map((accountId): React.ReactNode => (
|
|
<tr key={accountId}>
|
|
<td className='address'>
|
|
<AddressSmall value={accountId} />
|
|
</td>
|
|
<td>
|
|
{prime === accountId && (
|
|
<Tag
|
|
color='green'
|
|
hover={t('Committee prime member, default voting')}
|
|
label={t('prime member')}
|
|
/>
|
|
)}
|
|
</td>
|
|
<td className='all'> </td>
|
|
</tr>
|
|
))}
|
|
</Table>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Members);
|