import React from 'react'; import PropTypes from 'prop-types'; import styles from './styles.css'; import {Button, TextField} from 'plugin-api/beta/client/components/ui'; import t from 'coral-framework/services/i18n'; class ForgotContent extends React.Component { state = {value: ''}; handleSubmit = (e) => { e.preventDefault(); this.props.fetchForgotPassword(this.state.value); }; handleChangeEmail = (e) => { const {value} = e.target; this.setState({value}); } render() { const {changeView, auth} = this.props; const {passwordRequestSuccess, passwordRequestFailure} = auth; return (

{t('sign_in.recover_password')}

{passwordRequestSuccess ?

{passwordRequestSuccess}

: null} {passwordRequestFailure ?

{passwordRequestFailure}

: null}
{t('sign_in.need_an_account')} {' '} changeView('SIGNUP')}> {t('sign_in.register')} {t('sign_in.already_have_an_account')} {' '} changeView('SIGNIN')}> {t('sign_in.sign_in')}
); } } ForgotContent.propTypes = { auth: PropTypes.object, changeView: PropTypes.func, fetchForgotPassword: PropTypes.func, }; export default ForgotContent;