// @flow import React from 'react'; import Button from 'component/button'; import { Form, FormRow, FormField } from 'component/common/form'; import { Formik } from 'formik'; import { validateSendTx } from 'util/form-validation'; type DraftTransaction = { address: string, amount: number | string, // So we can use a placeholder in the input }; type Props = { sendToAddress: DraftTransaction => void, balance: number, }; class WalletSend extends React.PureComponent { constructor() { super(); (this: any).handleSubmit = this.handleSubmit.bind(this); } handleSubmit(values: DraftTransaction) { const { sendToAddress } = this.props; sendToAddress(values); } render() { const { balance } = this.props; return (
{__('Send Credits')}
(
balance && __('Not enough')) } />
)} />
); } } export default WalletSend;