waitlist-modal.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import GitHubLogo from "#/assets/branding/github-logo.svg?react";
  2. import AllHandsLogo from "#/assets/branding/all-hands-logo.svg?react";
  3. import { JoinWaitlistAnchor } from "./join-waitlist-anchor";
  4. import { WaitlistMessage } from "./waitlist-message";
  5. import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop";
  6. import { ModalButton } from "#/components/shared/buttons/modal-button";
  7. import { ModalBody } from "#/components/shared/modals/modal-body";
  8. interface WaitlistModalProps {
  9. ghToken: string | null;
  10. githubAuthUrl: string | null;
  11. }
  12. export function WaitlistModal({ ghToken, githubAuthUrl }: WaitlistModalProps) {
  13. return (
  14. <ModalBackdrop>
  15. <ModalBody>
  16. <AllHandsLogo width={68} height={46} />
  17. <WaitlistMessage content={ghToken ? "waitlist" : "sign-in"} />
  18. {!ghToken && (
  19. <ModalButton
  20. text="Connect to GitHub"
  21. icon={<GitHubLogo width={20} height={20} />}
  22. className="bg-[#791B80] w-full"
  23. onClick={() => {
  24. if (githubAuthUrl) {
  25. window.location.href = githubAuthUrl;
  26. }
  27. }}
  28. />
  29. )}
  30. {ghToken && <JoinWaitlistAnchor />}
  31. </ModalBody>
  32. </ModalBackdrop>
  33. );
  34. }