diff --git a/src/components/auth/login-form.tsx b/src/components/auth/login-form.tsx index 60145a0..66af4e9 100644 --- a/src/components/auth/login-form.tsx +++ b/src/components/auth/login-form.tsx @@ -95,6 +95,10 @@ export const LoginForm = ({ const onSubmit = async (values: z.infer) => { // Validate captcha token if turnstile is enabled and site key is available if (captchaConfigured && values.captchaToken) { + setIsPending(true); + setError(''); + setSuccess(''); + const captchaResult = await validateCaptchaAction({ captchaToken: values.captchaToken, }); diff --git a/src/components/auth/register-form.tsx b/src/components/auth/register-form.tsx index ea0dbba..b5e7d09 100644 --- a/src/components/auth/register-form.tsx +++ b/src/components/auth/register-form.tsx @@ -94,6 +94,10 @@ export const RegisterForm = ({ const onSubmit = async (values: z.infer) => { // Validate captcha token if turnstile is enabled and site key is available if (captchaConfigured && values.captchaToken) { + setIsPending(true); + setError(''); + setSuccess(''); + const captchaResult = await validateCaptchaAction({ captchaToken: values.captchaToken, }); @@ -119,13 +123,13 @@ export const RegisterForm = ({ }, { onRequest: (ctx) => { - console.log('register, request:', ctx.url); + // console.log('register, request:', ctx.url); setIsPending(true); setError(''); setSuccess(''); }, onResponse: (ctx) => { - console.log('register, response:', ctx.response); + // console.log('register, response:', ctx.response); setIsPending(false); }, onSuccess: (ctx) => {