mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
Change full constructor to use class property, fix typo in handleChangeEmail, pass value to TextField to ensure they stay in sync.
This commit is contained in:
@@ -5,19 +5,15 @@ import {Button, TextField} from 'plugin-api/beta/client/components/ui';
|
||||
import t from 'coral-framework/services/i18n';
|
||||
|
||||
class ForgotContent extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
this.state = {
|
||||
value: '',
|
||||
};
|
||||
}
|
||||
|
||||
state = {value: ''};
|
||||
|
||||
handleSubmit = (e) => {
|
||||
e.preventDefault();
|
||||
this.props.fetchForgotPassword(this.state.value);
|
||||
};
|
||||
|
||||
handleChangEmail = (e) => {
|
||||
handleChangeEmail = (e) => {
|
||||
const {value} = e.target;
|
||||
this.setState({value});
|
||||
}
|
||||
@@ -39,7 +35,8 @@ class ForgotContent extends React.Component {
|
||||
id="email"
|
||||
name="email"
|
||||
label={t('sign_in.email')}
|
||||
onChange={this.handleChangEmail}
|
||||
onChange={this.handleChangeEmail}
|
||||
value={this.state.value}
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user