Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fix: Signup options are not disabled (calcom#12610)
Browse files Browse the repository at this point in the history
* fix: Signup options are not disabled

* fixes/signup disabling suggested changes done

* chore: signup and login improvements

---------

Co-authored-by: Udit Takkar <[email protected]>
  • Loading branch information
Pratik-Kumar-621 and Udit-takkar authored Dec 1, 2023
1 parent 252ce07 commit 3d89809
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/web/pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
6 changes: 5 additions & 1 deletion apps/web/pages/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export default function Signup({
!!formMethods.formState.errors.email ||
!formMethods.getValues("email") ||
!formMethods.getValues("password") ||
isSubmitting ||
usernameTaken
}>
{premiumUsername && !usernameTaken
Expand Down Expand Up @@ -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",
Expand All @@ -401,6 +404,7 @@ export default function Signup({
}
if (!formMethods.getValues("email")) {
formMethods.trigger("email");

return;
}
const username = formMethods.getValues("username");
Expand Down

0 comments on commit 3d89809

Please sign in to comment.