2025-07-13 21:57:24 -07:00
|
|
|
import React from "react";
|
2025-01-05 00:06:24 -05:00
|
|
|
import { Body, Head, Html, Preview, Tailwind } from "@react-email/components";
|
2025-01-04 20:22:01 -05:00
|
|
|
import { themeColors } from "./lib/theme";
|
|
|
|
import {
|
|
|
|
EmailContainer,
|
|
|
|
EmailFooter,
|
|
|
|
EmailGreeting,
|
|
|
|
EmailHeading,
|
|
|
|
EmailLetterHead,
|
|
|
|
EmailSection,
|
2025-01-05 00:06:24 -05:00
|
|
|
EmailSignature,
|
2025-01-04 20:22:01 -05:00
|
|
|
EmailText
|
|
|
|
} from "./components/Email";
|
|
|
|
import CopyCodeBox from "./components/CopyCodeBox";
|
2024-10-03 20:55:54 -04:00
|
|
|
|
|
|
|
interface VerifyEmailProps {
|
|
|
|
username?: string;
|
|
|
|
verificationCode: string;
|
2024-11-28 00:11:13 -05:00
|
|
|
verifyLink: string;
|
2024-10-03 20:55:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export const VerifyEmail = ({
|
|
|
|
username,
|
|
|
|
verificationCode,
|
2024-12-25 15:54:32 -05:00
|
|
|
verifyLink
|
2024-10-03 20:55:54 -04:00
|
|
|
}: VerifyEmailProps) => {
|
2025-07-13 21:57:24 -07:00
|
|
|
const previewText = `Verify your email with code: ${verificationCode}`;
|
2024-10-03 20:55:54 -04:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Html>
|
|
|
|
<Head />
|
|
|
|
<Preview>{previewText}</Preview>
|
2025-01-04 20:22:01 -05:00
|
|
|
<Tailwind config={themeColors}>
|
2025-07-13 21:57:24 -07:00
|
|
|
<Body className="font-sans bg-gray-50">
|
2025-01-04 20:22:01 -05:00
|
|
|
<EmailContainer>
|
|
|
|
<EmailLetterHead />
|
|
|
|
|
2025-07-13 21:57:24 -07:00
|
|
|
{/* <EmailHeading>Verify Your Email Address</EmailHeading> */}
|
2025-01-04 20:22:01 -05:00
|
|
|
|
2025-07-13 21:57:24 -07:00
|
|
|
<EmailGreeting>Hi there,</EmailGreeting>
|
2024-12-30 23:41:06 -05:00
|
|
|
|
2025-01-04 20:22:01 -05:00
|
|
|
<EmailText>
|
2025-07-13 21:57:24 -07:00
|
|
|
Welcome! To complete your account setup, please
|
|
|
|
verify your email address using the code below.
|
2025-01-04 20:22:01 -05:00
|
|
|
</EmailText>
|
|
|
|
|
|
|
|
<EmailSection>
|
|
|
|
<CopyCodeBox text={verificationCode} />
|
|
|
|
</EmailSection>
|
|
|
|
|
|
|
|
<EmailText>
|
2025-07-13 21:57:24 -07:00
|
|
|
This verification code will expire in 15 minutes. If
|
|
|
|
you didn't create an account, you can safely ignore
|
2024-10-03 20:55:54 -04:00
|
|
|
this email.
|
2025-01-04 20:22:01 -05:00
|
|
|
</EmailText>
|
|
|
|
|
|
|
|
<EmailFooter>
|
2025-01-05 00:06:24 -05:00
|
|
|
<EmailSignature />
|
2025-01-04 20:22:01 -05:00
|
|
|
</EmailFooter>
|
|
|
|
</EmailContainer>
|
2024-10-03 20:55:54 -04:00
|
|
|
</Body>
|
|
|
|
</Tailwind>
|
|
|
|
</Html>
|
|
|
|
);
|
|
|
|
};
|
2024-11-28 00:11:13 -05:00
|
|
|
|
|
|
|
export default VerifyEmail;
|