ghost-portal/packages/app-council/src/Overview/Member.tsx
Jaco Greeff b4de745cda
Support latest api (with dynamic types) (#1447)
* Make a start, halfway down with issues found...

* Around  80% through untangling  the linter

* Seems linted...

* Adjust latest

* Update for latest (Moment -> u64)

* Method -> Call

* Bump api from npm

* formatNumber (no unwrap needed)

* Update to latest ui packages

* Revert internal version downgrades
2019-07-29 12:24:43 +02:00

34 lines
924 B
TypeScript

// Copyright 2017-2019 @polkadot/app-democracy 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 { BlockNumber } from '@polkadot/types/interfaces';
import { I18nProps } from '@polkadot/ui-app/types';
import React from 'react';
import { AddressCard } from '@polkadot/ui-app';
import { formatNumber } from '@polkadot/util';
import translate from '../translate';
interface Props extends I18nProps {
address: string;
block: BlockNumber;
}
class Member extends React.PureComponent<Props> {
public render (): React.ReactNode {
const { address, block, t } = this.props;
return (
<AddressCard
buttons={<div><label>{t('active until')}</label>#{formatNumber(block)}</div>}
defaultName='council member'
value={address}
/>
);
}
}
export default translate(Member);