2025-01-05 00:06:24 -05:00
|
|
|
|
import { Body, Head, Html, Preview, Tailwind } from "@react-email/components";
|
2024-10-03 20:55:54 -04:00
|
|
|
|
import * as React from "react";
|
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) => {
|
2024-12-31 18:25:11 -05:00
|
|
|
|
const previewText = `Your verification code is ${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}>
|
2024-10-03 20:55:54 -04:00
|
|
|
|
<Body className="font-sans">
|
2025-01-04 20:22:01 -05:00
|
|
|
|
<EmailContainer>
|
|
|
|
|
<EmailLetterHead />
|
|
|
|
|
|
|
|
|
|
<EmailHeading>Please Verify Your Email</EmailHeading>
|
|
|
|
|
|
|
|
|
|
<EmailGreeting>Hi {username || "there"},</EmailGreeting>
|
2024-12-30 23:41:06 -05:00
|
|
|
|
|
2025-01-04 20:22:01 -05:00
|
|
|
|
<EmailText>
|
2024-12-25 15:54:32 -05:00
|
|
|
|
You’ve requested to verify your email. Please use
|
2024-12-30 23:41:06 -05:00
|
|
|
|
the code below to complete the verification process
|
|
|
|
|
upon logging in.
|
2025-01-04 20:22:01 -05:00
|
|
|
|
</EmailText>
|
|
|
|
|
|
|
|
|
|
<EmailSection>
|
|
|
|
|
<CopyCodeBox text={verificationCode} />
|
|
|
|
|
</EmailSection>
|
|
|
|
|
|
|
|
|
|
<EmailText>
|
2024-10-03 20:55:54 -04:00
|
|
|
|
If you didn’t request this, you can safely ignore
|
|
|
|
|
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;
|