pr_01m47d15m3e54sn21z27rpy5n9/apps/web/app/lib/registration.ts
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 1 | import { useRouteLoaderData } from "react-router"; |
| 2 | ||
| 3 | import { signUpCopy } from "./invites"; | |
| 4 | ||
| 5 | /** | |
| 6 | * Whether g1t.sh is invite-only, from the root loader. Invite-only when the | |
| 7 | * root loader has not answered: no page should offer an open sign-up that | |
| 8 | * is not there. | |
| 9 | */ | |
| 10 | export function useInviteOnly(): boolean { | |
| 11 | const root = useRouteLoaderData("root") as { inviteOnly?: boolean } | undefined; | |
| 12 | return root?.inviteOnly ?? true; | |
| 13 | } | |
| 14 | ||
| 15 | /** What the sign-up buttons say on this page. */ | |
| 16 | export function useSignUpCopy() { | |
| 17 | return signUpCopy(useInviteOnly()); | |
| 18 | } |