fix: Signup options are not disabled (#12610)
* fix: Signup options are not disabled * fixes/signup disabling suggested changes done * chore: signup and login improvements --------- Co-authored-by: Udit Takkar <udit222001@gmail.com>
This commit is contained in:
parent
252ce07861
commit
3d89809e67
|
@ -251,6 +251,7 @@ inferSSRProps<typeof _getServerSideProps> & WithNonceProps<{}>) {
|
||||||
<Button
|
<Button
|
||||||
color="secondary"
|
color="secondary"
|
||||||
className="w-full justify-center"
|
className="w-full justify-center"
|
||||||
|
disabled={formState.isSubmitting}
|
||||||
data-testid="google"
|
data-testid="google"
|
||||||
StartIcon={FaGoogle}
|
StartIcon={FaGoogle}
|
||||||
onClick={async (e) => {
|
onClick={async (e) => {
|
||||||
|
|
|
@ -323,6 +323,7 @@ export default function Signup({
|
||||||
!!formMethods.formState.errors.email ||
|
!!formMethods.formState.errors.email ||
|
||||||
!formMethods.getValues("email") ||
|
!formMethods.getValues("email") ||
|
||||||
!formMethods.getValues("password") ||
|
!formMethods.getValues("password") ||
|
||||||
|
isSubmitting ||
|
||||||
usernameTaken
|
usernameTaken
|
||||||
}>
|
}>
|
||||||
{premiumUsername && !usernameTaken
|
{premiumUsername && !usernameTaken
|
||||||
|
@ -387,7 +388,9 @@ export default function Signup({
|
||||||
disabled={
|
disabled={
|
||||||
!!formMethods.formState.errors.username ||
|
!!formMethods.formState.errors.username ||
|
||||||
!!formMethods.formState.errors.email ||
|
!!formMethods.formState.errors.email ||
|
||||||
premiumUsername
|
premiumUsername ||
|
||||||
|
isSubmitting ||
|
||||||
|
isGoogleLoading
|
||||||
}
|
}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"w-full justify-center rounded-md text-center",
|
"w-full justify-center rounded-md text-center",
|
||||||
|
@ -401,6 +404,7 @@ export default function Signup({
|
||||||
}
|
}
|
||||||
if (!formMethods.getValues("email")) {
|
if (!formMethods.getValues("email")) {
|
||||||
formMethods.trigger("email");
|
formMethods.trigger("email");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const username = formMethods.getValues("username");
|
const username = formMethods.getValues("username");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user