import React from "react"; import Container from "./Container"; import { createMessage, VERIFICATION_PENDING_NO_EMAIL, VERIFICATION_PENDING_NOT_YOU, VERIFICATION_PENDING_RESEND_LINK, VERIFICATION_PENDING_TITLE, } from "ee/constants/messages"; import type { RouteComponentProps } from "react-router-dom"; import { Button, Callout, Link, Text } from "@appsmith/ads"; import styled from "styled-components"; import { AUTH_LOGIN_URL } from "constants/routes"; import { useResendEmailVerification } from "./helpers"; const Body = styled.div` display: flex; flex-direction: column; align-items: center; text-align: center; `; const Email = styled(Text)` font-weight: var(--ads-v2-font-weight-bold); `; const VerificationPending = (props: RouteComponentProps<{ email: string }>) => { const queryParams = new URLSearchParams(props.location.search); const email = queryParams.get("email"); const [resendVerificationLink, enabled, clicks] = useResendEmailVerification(email); return ( {createMessage(VERIFICATION_PENDING_NOT_YOU)} } testId="verification-pending" title={createMessage(VERIFICATION_PENDING_TITLE)} > Click the verification link sent to {email} to finish setting up your account. {createMessage(VERIFICATION_PENDING_NO_EMAIL)} {clicks > 1 ? ( Still having trouble with the email? Reach out to the instance admin, and they can help you get started ) : null} ); }; export default VerificationPending;