Skip to content

Commit 7a05485

Browse files
committed
feat: prevent submission when loading captcha
1 parent 5074f15 commit 7a05485

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/components/auth/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const LoginForm: React.FC<LoginFormProps> = ({ cfCaptchaSiteKey }) => {
7777

7878
<button
7979
type="submit"
80-
disabled={isLoading}
80+
disabled={!isCaptchaVerified || isLoading}
8181
className={`
8282
w-full flex justify-center py-2 px-4 border border-transparent rounded-md
8383
text-sm font-medium text-white bg-blue-600 hover:bg-blue-700

src/components/auth/ResetPasswordForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const ResetPasswordForm: React.FC<ResetPasswordFormProps> = ({ cfCaptchaS
8787

8888
<button
8989
type="submit"
90-
disabled={isLoading}
90+
disabled={!isCaptchaVerified || isLoading}
9191
className={`
9292
w-full flex justify-center py-2 px-4 border border-transparent rounded-md
9393
text-sm font-medium text-white bg-blue-600 hover:bg-blue-700

src/components/auth/SignupForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export const SignupForm: React.FC<SignupFormProps> = ({ cfCaptchaSiteKey }) => {
123123

124124
<button
125125
type="submit"
126-
disabled={isLoading}
126+
disabled={!isCaptchaVerified || isLoading}
127127
className={`
128128
w-full flex justify-center py-2 px-4 border border-transparent rounded-md
129129
text-sm font-medium text-white bg-blue-600 hover:bg-blue-700

src/components/auth/UpdatePasswordResetForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const UpdatePasswordResetForm: React.FC<UpdatePasswordResetFormProps> = (
112112

113113
<button
114114
type="submit"
115-
disabled={isLoading}
115+
disabled={!isCaptchaVerified || isLoading}
116116
className={`
117117
w-full flex justify-center py-2 px-4 border border-transparent rounded-md
118118
text-sm font-medium text-white bg-blue-600 hover:bg-blue-700

0 commit comments

Comments
 (0)