import React from "react"; import Container from "./Container"; import { createMessage, VERIFICATION_PENDING_BODY, VERIFICATION_PENDING_NO_EMAIL, VERIFICATION_PENDING_NOT_YOU, VERIFICATION_PENDING_RESEND_LINK, VERIFICATION_PENDING_TITLE, } from "@appsmith/constants/messages"; import type { RouteComponentProps } from "react-router-dom"; import { Button, Callout, Link, Text } from "design-system"; 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_BODY)} {email} {createMessage(VERIFICATION_PENDING_NOT_YOU)} {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;