import React from 'react'; import Link from 'component/link'; import { Form, FormRow, Submit } from 'component/form.js'; class UserEmailVerify extends React.PureComponent { constructor(props) { super(props); this.state = { code: '', }; } handleCodeChanged(event) { this.setState({ code: String(event.target.value).trim(), }); } handleSubmit() { const { code } = this.state; try { const verification = JSON.parse(atob(code)); this.props.verifyUserEmail(verification.token, verification.recaptcha); } catch (error) { this.props.verifyUserEmailFailure('Invalid Verification Token'); } } render() { const { cancelButton, errorMessage, email, isPending } = this.props; return (
); } } export default UserEmailVerify;