import styles from './styles.css'; import React from 'react'; import { Button, TextField, Spinner, Success, Alert, } from 'plugin-api/beta/client/components/ui'; import t from 'coral-framework/services/i18n'; class SignUpContent extends React.Component { componentWillReceiveProps(next) { if ( !this.props.emailVerificationEnabled && !this.props.auth.successSignUp && next.auth.successSignUp ) { setTimeout(() => { this.props.changeView('SIGNIN'); }, 2000); } } render() { const { handleChange, formData, emailVerificationEnabled, auth, errors, showErrors, changeView, handleSignUp, fetchSignUpFacebook, } = this.props; return (

{t('sign_in.sign_up')}

{auth.error && {auth.error}} {!auth.successSignUp && (

{t('sign_in.or')}

{errors.password && ( {' '} Password must be at least 8 characters.{' '} )}
{auth.isLoading && }
)} {auth.successSignUp && (
{emailVerificationEnabled && (

{t('sign_in.verify_email')}

{t('sign_in.verify_email2')}

)}
)}
{t('sign_in.already_have_an_account')}{' '} changeView('SIGNIN')}> {t('sign_in.sign_in')}
); } } export default SignUpContent;