import React from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; import styles from './ChangeUsernameDialog.css'; import InputField from './InputField'; import { Button, Dialog } from 'plugin-api/beta/client/components/ui'; import { t } from 'plugin-api/beta/client/services'; class ChangeEmailDialog extends React.Component { state = { showError: false, errors: { passowrd: '', }, }; showError = () => { this.setState({ showError: true, }); }; confirmChanges = async () => { if (this.formHasError()) { this.showError(); } else { await this.props.saveChanges(); this.props.closeDialog(); } }; render() { return ( ×

{t('talk-plugin-auth.change_email.confirm_email_change')}

{t('talk-plugin-auth.change_email.description')}

{t('talk-plugin-auth.change_email.old_email')}: {this.props.email} {t('talk-plugin-auth.change_email.new_email')}:{' '} {this.props.formData.newEmail}
); } } ChangeEmailDialog.propTypes = { saveChanges: PropTypes.func, closeDialog: PropTypes.func, showDialog: PropTypes.bool, onChange: PropTypes.func, email: PropTypes.string, formData: PropTypes.object, }; export default ChangeEmailDialog;