Skip to content

Commit 506d382

Browse files
authored
fix(auth): hide Turnstile widget container to prevent layout gap (#3706)
The invisible Turnstile iframe was taking up space between the password field and submit button. Wrapped in a hidden div.
1 parent 951c8fd commit 506d382

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

apps/sim/app/(auth)/login/login-form.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,13 @@ export default function LoginPage({
472472
</div>
473473

474474
{turnstileSiteKey && (
475-
<Turnstile
476-
ref={turnstileRef}
477-
siteKey={turnstileSiteKey}
478-
options={{ size: 'invisible', execution: 'execute' }}
479-
/>
475+
<div className='h-0 w-0 overflow-hidden'>
476+
<Turnstile
477+
ref={turnstileRef}
478+
siteKey={turnstileSiteKey}
479+
options={{ size: 'invisible', execution: 'execute' }}
480+
/>
481+
</div>
480482
)}
481483

482484
{formError && (

apps/sim/app/(auth)/signup/signup-form.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,13 @@ function SignupFormContent({
478478
</div>
479479

480480
{turnstileSiteKey && (
481-
<Turnstile
482-
ref={turnstileRef}
483-
siteKey={turnstileSiteKey}
484-
options={{ size: 'invisible', execution: 'execute' }}
485-
/>
481+
<div className='h-0 w-0 overflow-hidden'>
482+
<Turnstile
483+
ref={turnstileRef}
484+
siteKey={turnstileSiteKey}
485+
options={{ size: 'invisible', execution: 'execute' }}
486+
/>
487+
</div>
486488
)}
487489

488490
{formError && (

0 commit comments

Comments
 (0)