| 62 | }; |
| 63 | |
| 64 | const getDefaultDisplay = (): Display => { |
| 65 | if (loginState?.defaultDisplay) { |
| 66 | return loginState.defaultDisplay; |
| 67 | } |
| 68 | if (loginState?.formValues?.email) { |
| 69 | return Display.Registration; |
| 70 | } |
| 71 | // Always land on AuthDefault; `isLoginFlow` (tracked locally below) |
| 72 | // decides whether it renders as Sign up or Log in. We deliberately do |
| 73 | // NOT use OnboardingSignup here — that variant lives on /onboarding and |
| 74 | // the bottom AuthenticationBanner; the inline modal should reuse the |
| 75 | // same screen the rest of the app already shows for login/signup. |
| 76 | return Display.Default; |
| 77 | }; |
| 78 | const defaultDisplay = getDefaultDisplay(); |
| 79 | |
| 80 | // `AuthOptionsInner` doesn't own `isLoginFlow` — it expects the parent to |