// Copyright 2017-2019 @polkadot/app-address-book 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 { KeyringAddress } from '@polkadot/ui-keyring/types'; import { I18nProps } from '@polkadot/ui-app/types'; import { ComponentProps } from './types'; import React from 'react'; import { AddressRow, Button, Input, InputAddress, InputTags, TxComponent } from '@polkadot/ui-app'; import { ActionStatus } from '@polkadot/ui-app/Status/types'; import keyring from '@polkadot/ui-keyring'; import Forgetting from './Forgetting'; import translate from './translate'; type Props = ComponentProps & I18nProps; type State = { current: KeyringAddress | null, editedName: string, isEdited: boolean, isForgetOpen: boolean, tags: Array }; class Editor extends TxComponent { state: State; constructor (props: Props) { super(props); this.state = this.createState(null); } render () { const { isForgetOpen, current } = this.state; return (
{this.renderData()}
); } renderButtons () { const { t } = this.props; const { current, isEdited } = this.state; if (!current) { return null; } return (