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
|
||||
color="secondary"
|
||||
className="w-full justify-center"
|
||||
disabled={formState.isSubmitting}
|
||||
data-testid="google"
|
||||
StartIcon={FaGoogle}
|
||||
onClick={async (e) => {
|
||||
|
|
|
@ -323,6 +323,7 @@ export default function Signup({
|
|||
!!formMethods.formState.errors.email ||
|
||||
!formMethods.getValues("email") ||
|
||||
!formMethods.getValues("password") ||
|
||||
isSubmitting ||
|
||||
usernameTaken
|
||||
}>
|
||||
{premiumUsername && !usernameTaken
|
||||
|
@ -387,7 +388,9 @@ export default function Signup({
|
|||
disabled={
|
||||
!!formMethods.formState.errors.username ||
|
||||
!!formMethods.formState.errors.email ||
|
||||
premiumUsername
|
||||
premiumUsername ||
|
||||
isSubmitting ||
|
||||
isGoogleLoading
|
||||
}
|
||||
className={classNames(
|
||||
"w-full justify-center rounded-md text-center",
|
||||
|
@ -401,6 +404,7 @@ export default function Signup({
|
|||
}
|
||||
if (!formMethods.getValues("email")) {
|
||||
formMethods.trigger("email");
|
||||
|
||||
return;
|
||||
}
|
||||
const username = formMethods.getValues("username");
|
||||
|
|
Loading…
Reference in New Issue
Block a user