import React from 'react'; import PropTypes from 'prop-types'; import { Button, TextField, Spinner, Alert, } from 'plugin-api/beta/client/components/ui'; import styles from './styles.css'; import t from 'coral-framework/services/i18n'; const SignInContent = ({ handleChange, formData, changeView, handleSignIn, auth, fetchSignInFacebook, }) => { return (

{t('sign_in.sign_in_to_join')}

{auth.error && ( {auth.error.translation_key ? t(`error.${auth.error.translation_key}`) : auth.error.toString()} )}

{t('sign_in.or')}

{!auth.isLoading ? ( ) : ( )}
changeView('FORGOT')}> {t('sign_in.forgot_your_pass')} {t('sign_in.need_an_account')} changeView('SIGNUP')} id="coralRegister"> {t('sign_in.register')}
); }; SignInContent.propTypes = { auth: PropTypes.shape({ isLoading: PropTypes.bool.isRequired, error: PropTypes.string, emailVerificationFailure: PropTypes.bool, }).isRequired, fetchSignInFacebook: PropTypes.func.isRequired, handleSignIn: PropTypes.func.isRequired, handleChange: PropTypes.func.isRequired, changeView: PropTypes.func.isRequired, emailVerificationLoading: PropTypes.bool.isRequired, emailVerificationSuccess: PropTypes.bool.isRequired, resendVerification: PropTypes.func.isRequired, formData: PropTypes.object, }; export default SignInContent;