Login Page redesign
This commit is contained in:
@@ -123,10 +123,14 @@ export default function MobileLoginPage() {
|
||||
(mutation as { isPending?: boolean; isLoading?: boolean }).isPending ??
|
||||
(mutation as { isPending?: boolean; isLoading?: boolean }).isLoading ??
|
||||
false;
|
||||
const isFormValid = login.trim().length > 0 && password.length > 0;
|
||||
|
||||
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
setError(null);
|
||||
if (!isFormValid) {
|
||||
return;
|
||||
}
|
||||
mutation.mutate({
|
||||
login,
|
||||
password,
|
||||
@@ -228,7 +232,7 @@ export default function MobileLoginPage() {
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={isSubmitting}
|
||||
disabled={isSubmitting || !isFormValid}
|
||||
height={52}
|
||||
borderRadius={16}
|
||||
backgroundColor={primary}
|
||||
|
||||
Reference in New Issue
Block a user