From 708ced4195249b6d31b8be2a1f8b4bc2ded1d22b Mon Sep 17 00:00:00 2001 From: Patrick Schaub Date: Wed, 5 Jul 2023 22:57:22 +0200 Subject: [PATCH] fix: onSuccess prop in Turnstile captcha docs --- apps/docs/pages/guides/auth/auth-captcha.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/docs/pages/guides/auth/auth-captcha.mdx b/apps/docs/pages/guides/auth/auth-captcha.mdx index fac1bdf87d1..0834167875d 100644 --- a/apps/docs/pages/guides/auth/auth-captcha.mdx +++ b/apps/docs/pages/guides/auth/auth-captcha.mdx @@ -165,18 +165,18 @@ Let's create an empty state to store our `captchaToken` const [captchaToken, setCaptchaToken] = useState() ``` -Now lets add the Cloudflare Turnstile component to the JSX section of our code +Now lets add the Cloudflare Turnstile component to the JSX section of our code: ```html ``` -We will pass it the sitekey we copied from the Cloudflare website as a property along with a `onVerify` property which takes a callback function. This callback function will have a token as one of its properties. Let's set the token in the state using `setCaptchaToken` +We will pass it the sitekey we copied from the Cloudflare website as a property along with a `onSuccess` property which takes a callback function. This callback function will have a token as one of its properties. Let's set the token in the state using `setCaptchaToken`: ```jsx { setCaptchaToken(token) } + onSuccess={(token) => { setCaptchaToken(token) } /> ```