Skip to content

Commit 7151e98

Browse files
waleedlatif1claude
andcommitted
fix(landing): prevent mobile auth modal from unmounting on open
Remove setMobileMenuOpen(false) from mobile AuthModal button onClick handlers. Closing the mobile menu unmounts the AuthModal before it can open. The modal overlay or page redirect makes the menu irrelevant without needing to explicitly close it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f89e96e commit 7151e98

File tree

1 file changed

+4
-6
lines changed
  • apps/sim/app/(landing)/components/navbar

1 file changed

+4
-6
lines changed

apps/sim/app/(landing)/components/navbar/navbar.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,13 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
350350
<button
351351
type='button'
352352
className='flex h-[32px] items-center justify-center rounded-[5px] border border-[var(--landing-border-strong)] text-[14px] text-[var(--landing-text)] transition-colors active:bg-[var(--landing-bg-elevated)]'
353-
onClick={() => {
353+
onClick={() =>
354354
trackLandingCta({
355355
label: 'Log in',
356356
section: 'navbar',
357357
destination: 'auth_modal',
358358
})
359-
setMobileMenuOpen(false)
360-
}}
359+
}
361360
aria-label='Log in'
362361
>
363362
Log in
@@ -367,14 +366,13 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
367366
<button
368367
type='button'
369368
className='flex h-[32px] items-center justify-center rounded-[5px] border border-[var(--white)] bg-[var(--white)] text-[14px] text-black transition-colors active:bg-[#E0E0E0]'
370-
onClick={() => {
369+
onClick={() =>
371370
trackLandingCta({
372371
label: 'Get started',
373372
section: 'navbar',
374373
destination: 'auth_modal',
375374
})
376-
setMobileMenuOpen(false)
377-
}}
375+
}
378376
aria-label='Get started with Sim'
379377
>
380378
Get started

0 commit comments

Comments
 (0)