mirror of
https://github.com/wassname/talk.git
synced 2026-08-04 13:23:35 +08:00
Ádding Debouncing for CheckAvailability, Valid Check form and Styling
This commit is contained in:
@@ -39,7 +39,6 @@ class SignInContainer extends Component {
|
||||
this.handleSignUp = this.handleSignUp.bind(this);
|
||||
this.handleSignIn = this.handleSignIn.bind(this);
|
||||
this.handleClose = this.handleClose.bind(this);
|
||||
this.cleanState = this.cleanState.bind(this);
|
||||
this.addError = this.addError.bind(this);
|
||||
}
|
||||
|
||||
@@ -47,10 +46,6 @@ class SignInContainer extends Component {
|
||||
window.authCallback = this.props.facebookCallback;
|
||||
}
|
||||
|
||||
cleanState () {
|
||||
this.setState(this.initialState);
|
||||
}
|
||||
|
||||
handleChange(e) {
|
||||
const {name, value} = e.target;
|
||||
this.setState(state => ({
|
||||
@@ -90,7 +85,7 @@ class SignInContainer extends Component {
|
||||
this.setState(state => ({...state, errors}));
|
||||
// Checks Email Availability
|
||||
if (name === 'email') {
|
||||
debounce(checkAvailability({[name]: value}), 250);
|
||||
debounce(() => checkAvailability({[name]: value}), 250);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,7 +130,7 @@ class SignInContainer extends Component {
|
||||
Sign in to comment
|
||||
</Button>
|
||||
<SignDialog
|
||||
open={showSignInDialog}
|
||||
open={auth.showSignInDialog}
|
||||
view={auth.view}
|
||||
{...this}
|
||||
{...this.state}
|
||||
|
||||
Reference in New Issue
Block a user