// @flow import * as React from 'react'; import { FormRow, FormField } from 'component/common/form'; import { Modal } from 'modal/modal'; import Button from 'component/button'; type Props = { closeModal: () => void, error: ?string, rewardIsPending: boolean, submitRewardCode: string => void, }; type State = { rewardCode: string, }; class ModalRewardCode extends React.PureComponent { constructor() { super(); this.state = { rewardCode: '', }; (this: any).handleSubmit = this.handleSubmit.bind(this); } handleSubmit() { const { rewardCode } = this.state; const { submitRewardCode } = this.props; submitRewardCode(rewardCode); } render() { const { closeModal, rewardIsPending, error } = this.props; const { rewardCode } = this.state; return (

{__('Enter Reward Code')}

this.setState({ rewardCode: e.target.value })} helper={ {__('Redeem a LBRY generated reward code for LBC')} {'. '}
); } } export default ModalRewardCode;