Complain if they log in with email
This commit is contained in:
parent
a757534061
commit
f88256eb74
|
@ -13,6 +13,9 @@ export function LoginForm(props) {
|
|||
const handleChange = (e) => handleValues(e, e.currentTarget);
|
||||
|
||||
const handleSubmit = (e) => {
|
||||
if (input.username.includes('@')) {
|
||||
setError({ username: 'Username, not email.' });
|
||||
} else {
|
||||
if (loading) return;
|
||||
setLoading(true);
|
||||
const data = { ...input, username: input.username.toLowerCase() };
|
||||
|
@ -27,6 +30,7 @@ export function LoginForm(props) {
|
|||
console.log(err);
|
||||
setError(err.data);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user