import React from 'react';
import {
Button,
Spinner,
Success,
Alert,
} from 'plugin-api/beta/client/components/ui';
import PropTypes from 'prop-types';
import styles from './ResendVerification.css';
import t from 'coral-framework/services/i18n';
class ResendVerification extends React.Component {
render() {
const { resendVerification, error, loading, success, email } = this.props;
return (
{t('sign_in.email_verify_cta')}
{error && (
{error.translation_key
? t(`error.${error.translation_key}`)
: error.toString()}
)}
{t('error.email_not_verified', email)}
{loading && }
{success && }
);
}
}
ResendVerification.propTypes = {
resendVerification: PropTypes.bool.isRequired,
error: PropTypes.object,
loading: PropTypes.bool,
success: PropTypes.bool,
email: PropTypes.string.isRequired,
};
export default ResendVerification;