(props: LoginProps)
| 17 | } |
| 18 | |
| 19 | export default async function Signup(props: LoginProps) { |
| 20 | const searchParams = await props.searchParams; |
| 21 | const session = await auth(); |
| 22 | if (session) { |
| 23 | logger.info("Session found in signup page, redirecting to home"); |
| 24 | return redirect("/"); |
| 25 | } |
| 26 | |
| 27 | const org = await __unsafePrisma.org.findUnique({ where: { id: SINGLE_TENANT_ORG_ID } }); |
| 28 | if (!org || !org.isOnboarded) { |
| 29 | return redirect("/onboard"); |
| 30 | } |
| 31 | |
| 32 | const anonymousAccessEnabled = await isAnonymousAccessEnabled(); |
| 33 | |
| 34 | return ( |
| 35 | <div className="flex flex-col min-h-screen bg-backgroundSecondary"> |
| 36 | <div className="flex-1 flex flex-col items-center p-4 sm:p-12 w-full"> |
| 37 | <LoginForm |
| 38 | callbackUrl={searchParams.callbackUrl} |
| 39 | error={searchParams.error} |
| 40 | context="signup" |
| 41 | isAnonymousAccessEnabled={anonymousAccessEnabled} |
| 42 | hideSecurityNotice={env.EXPERIMENT_ASK_GH_ENABLED === 'true'} |
| 43 | /> |
| 44 | </div> |
| 45 | <Footer /> |
| 46 | </div> |
| 47 | ) |
| 48 | } |
nothing calls this directly
no test coverage detected