mirror of
https://github.com/pezkuwichain/pezkuwi-sdk-ui.git
synced 2026-06-17 20:41:07 +00:00
Initial commit: Pezkuwi SDK UI
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>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
// 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);
|
||||
Reference in New Issue
Block a user