Commit 8e5e89bb by JunXiaoRuo Committed by GitHub

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

Co-authored-by: Codex <codex@users.noreply.github.com>
parent e13d6734
...@@ -148,6 +148,8 @@ export function SignUpForm({ ...@@ -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,6 +320,9 @@ export function SignUpForm({ ...@@ -318,6 +320,9 @@ export function SignUpForm({
</Button> </Button>
</div> </div>
</>
)}
{/* Turnstile */} {/* Turnstile */}
{isTurnstileEnabled && ( {isTurnstileEnabled && (
<div className='mt-2'> <div className='mt-2'>
...@@ -327,8 +332,6 @@ export function SignUpForm({ ...@@ -327,8 +332,6 @@ export function SignUpForm({
/> />
</div> </div>
)} )}
</>
)}
<LegalConsent <LegalConsent
status={status} status={status}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment