// @flow import * as React from 'react'; import { FormField, Form } 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 (

{__('Redeem a custom reward code for LBC')} {'. '}