MCPcopy Create free account
hub / github.com/dailydotdev/apps / getDefaultDisplay

Function getDefaultDisplay

packages/shared/src/components/auth/AuthModal.tsx:64–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

AuthModalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected