ghost-portal/packages/app-tech-comm/src/Overview/Members.tsx
Jaco Greeff b1fea8cf2c
Basic tech committee (#1977)
* Tech comm

* Basic tech committee app (excl. proposals)
2019-12-02 17:31:35 +01:00

42 lines
1.1 KiB
TypeScript

// Copyright 2017-2019 @polkadot/app-tech-comm authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { AccountId } from '@polkadot/types/interfaces';
import { I18nProps } from '@polkadot/react-components/types';
import React from 'react';
import { AddressSmall, Table } from '@polkadot/react-components';
import translate from '../translate';
interface Props extends I18nProps {
members?: AccountId[];
className?: string;
}
function Members ({ className, members, t }: Props): React.ReactElement<Props> {
return (
<div className={className}>
{members?.length
? (
<Table>
<Table.Body>
{members.map((accountId): React.ReactNode => (
<tr key={accountId.toString()}>
<td>
<AddressSmall value={accountId} />
</td>
</tr>
))}
</Table.Body>
</Table>
)
: t('No members found')
}
</div>
);
}
export default translate(Members);