Member.tsx 963 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2017-2020 @polkadot/app-society authors & contributors
  2. // This software may be modified and distributed under the terms
  3. // of the Apache-2.0 license. See the LICENSE file for details.
  4. import { DeriveSocietyMember } from '@polkadot/api-derive/types';
  5. import React from 'react';
  6. import { AddressSmall } from '@polkadot/react-components';
  7. import { useTranslation } from '../translate';
  8. interface Props {
  9. value: DeriveSocietyMember;
  10. }
  11. export default function Member ({ value: { accountId, isSuspended, strikes } }: Props): React.ReactElement<Props> {
  12. const { t } = useTranslation();
  13. return (
  14. <tr>
  15. <td className='top'>
  16. <AddressSmall value={accountId} />
  17. </td>
  18. <td className='number top'>
  19. <label>{t('strikes')}</label>
  20. {strikes.toString()}
  21. </td>
  22. <td className='number top'>
  23. <label>{t('suspended')}</label>
  24. {isSuspended ? t('Yes') : t('No')}
  25. </td>
  26. </tr>
  27. );
  28. }