// Copyright 2017-2019 @polkadot/ui-staking 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 { I18nProps } from '@polkadot/react-components/types'; import React from 'react'; import { Button, Dropdown, InputAddress, Modal, TxButton, TxComponent } from '@polkadot/react-components'; import { withMulti } from '@polkadot/react-api'; import translate from '../../translate'; import { rewardDestinationOptions } from '../constants'; interface Props extends I18nProps { defaultDestination?: number; controllerId: string; onClose: () => void; } interface State { destination: number; } class SetRewardDestination extends TxComponent { public constructor (props: Props) { super(props); this.state = { destination: 0 }; } public render (): React.ReactNode { const { controllerId, onClose, t } = this.props; const { destination } = this.state; const canSubmit = !!controllerId; return ( {this.renderContent()}