修复 切换新版前端Turnstile 开启后注册页未显示验证的问题 (#5011)

Co-authored-by: Codex <codex@users.noreply.github.com>
This commit is contained in:
JunXiaoRuo
2026-05-22 10:39:24 +08:00
committed by GitHub
co-authored by Codex
parent e13d673454
commit 8e5e89bb5b
@@ -148,6 +148,8 @@ export function SignUpForm({
} }
} }
if (!validateTurnstile()) return
setIsLoading(true) setIsLoading(true)
try { try {
const res = await register({ const res = await register({
@@ -318,18 +320,19 @@ export function SignUpForm({
</Button> </Button>
</div> </div>
{/* Turnstile */}
{isTurnstileEnabled && (
<div className='mt-2'>
<Turnstile
siteKey={turnstileSiteKey}
onVerify={setTurnstileToken}
/>
</div>
)}
</> </>
)} )}
{/* Turnstile */}
{isTurnstileEnabled && (
<div className='mt-2'>
<Turnstile
siteKey={turnstileSiteKey}
onVerify={setTurnstileToken}
/>
</div>
)}
<LegalConsent <LegalConsent
status={status} status={status}
checked={agreedToLegal} checked={agreedToLegal}