mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 22:12:19 +03:00
sign-in: never visually show a uppercase character in a username
This commit is contained in:
parent
c8591afaad
commit
1eb59f4b53
@ -112,6 +112,10 @@ export default class SceneSignIn extends React.Component {
|
||||
this.setState({ [e.target.name]: e.target.value });
|
||||
};
|
||||
|
||||
_handleUsernameChange = (e) => {
|
||||
this.setState({ [e.target.name]: e.target.value.toLowerCase() });
|
||||
};
|
||||
|
||||
_handleSubmit = async () => {
|
||||
this.setState({ loading: true });
|
||||
|
||||
@ -155,7 +159,7 @@ export default class SceneSignIn extends React.Component {
|
||||
this.setState({ loading: true });
|
||||
|
||||
const response = await Actions.checkUsername({
|
||||
username: this.state.username,
|
||||
username: this.state.username.toLowerCase(),
|
||||
});
|
||||
|
||||
if (!response) {
|
||||
@ -205,7 +209,7 @@ export default class SceneSignIn extends React.Component {
|
||||
name="username"
|
||||
type="text"
|
||||
value={this.state.username}
|
||||
onChange={this._handleChange}
|
||||
onChange={this._handleUsernameChange}
|
||||
onSubmit={this._handleCheckUsername}
|
||||
/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user