// @flow import React from 'react'; import Button from 'component/button'; import { Form, FormField } from 'component/common/form'; import CopyableText from 'component/copyableText'; import Card from 'component/common/card'; type FormProps = { inviteNew: string => void, errorMessage: ?string, isPending: boolean, }; type FormState = { email: string, }; class FormInviteNew extends React.PureComponent { constructor() { super(); this.state = { email: '', }; (this: any).handleSubmit = this.handleSubmit.bind(this); } handleEmailChanged(event) { this.setState({ email: event.target.value, }); } handleSubmit() { const { email } = this.state; this.props.inviteNew(email); } render() { const { errorMessage, isPending } = this.props; return (
} onChange={event => { this.handleEmailChanged(event); }} /> ); } } type Props = { errorMessage: ?string, inviteNew: string => void, isPending: boolean, rewardAmount: number, referralLink: string, }; class InviteNew extends React.PureComponent { render() { const { errorMessage, inviteNew, isPending, rewardAmount, referralLink } = this.props; return (

{__('Earn')}