import React from "react"; import AllHandsLogo from "#/assets/branding/all-hands-logo.svg?react"; import { JoinWaitlistAnchor } from "./join-waitlist-anchor"; import { WaitlistMessage } from "./waitlist-message"; import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop"; import { ModalBody } from "#/components/shared/modals/modal-body"; import { TOSCheckbox } from "./tos-checkbox"; import { handleCaptureConsent } from "#/utils/handle-capture-consent"; import { BrandButton } from "../settings/brand-button"; import GitHubLogo from "#/assets/branding/github-logo.svg?react"; interface WaitlistModalProps { ghTokenIsSet: boolean; githubAuthUrl: string | null; } export function WaitlistModal({ ghTokenIsSet, githubAuthUrl, }: WaitlistModalProps) { const [isTosAccepted, setIsTosAccepted] = React.useState(false); const handleGitHubAuth = () => { if (githubAuthUrl) { handleCaptureConsent(true); window.location.href = githubAuthUrl; } }; return ( setIsTosAccepted((prev) => !prev)} /> {!ghTokenIsSet && ( } > Connect to GitHub )} {ghTokenIsSet && } ); }