2025-07-13 21:57:24 -07:00
|
|
|
import React from "react";
|
|
|
|
import { Body, Head, Html, Preview, Tailwind } from "@react-email/components";
|
2025-01-04 20:22:01 -05:00
|
|
|
import {
|
|
|
|
EmailContainer,
|
|
|
|
EmailLetterHead,
|
|
|
|
EmailHeading,
|
|
|
|
EmailText,
|
|
|
|
EmailFooter,
|
|
|
|
EmailSection,
|
2025-01-05 00:06:24 -05:00
|
|
|
EmailGreeting,
|
|
|
|
EmailSignature
|
2025-01-04 20:22:01 -05:00
|
|
|
} from "./components/Email";
|
|
|
|
import { themeColors } from "./lib/theme";
|
|
|
|
import CopyCodeBox from "./components/CopyCodeBox";
|
2024-12-15 17:47:07 -05:00
|
|
|
|
|
|
|
interface ResourceOTPCodeProps {
|
|
|
|
email?: string;
|
|
|
|
resourceName: string;
|
|
|
|
orgName: string;
|
|
|
|
otp: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const ResourceOTPCode = ({
|
|
|
|
email,
|
|
|
|
resourceName,
|
|
|
|
orgName: organizationName,
|
|
|
|
otp
|
|
|
|
}: ResourceOTPCodeProps) => {
|
2025-07-13 21:57:24 -07:00
|
|
|
const previewText = `Your access code for ${resourceName}: ${otp}`;
|
2024-12-15 17:47:07 -05: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 />
|
2024-12-30 23:41:06 -05:00
|
|
|
|
2025-07-13 21:57:24 -07:00
|
|
|
{/* <EmailHeading> */}
|
|
|
|
{/* Access Code for {resourceName} */}
|
|
|
|
{/* </EmailHeading> */}
|
2025-01-04 20:22:01 -05:00
|
|
|
|
2025-07-13 21:57:24 -07:00
|
|
|
<EmailGreeting>Hi there,</EmailGreeting>
|
2025-01-04 20:22:01 -05:00
|
|
|
|
|
|
|
<EmailText>
|
2025-07-13 21:57:24 -07:00
|
|
|
You've requested access to{" "}
|
2024-12-15 17:47:07 -05:00
|
|
|
<strong>{resourceName}</strong> in{" "}
|
2025-07-13 21:57:24 -07:00
|
|
|
<strong>{organizationName}</strong>. Use the
|
|
|
|
verification code below to complete your
|
|
|
|
authentication.
|
2025-01-04 20:22:01 -05:00
|
|
|
</EmailText>
|
|
|
|
|
|
|
|
<EmailSection>
|
|
|
|
<CopyCodeBox text={otp} />
|
|
|
|
</EmailSection>
|
|
|
|
|
2025-07-13 21:57:24 -07:00
|
|
|
<EmailText>
|
|
|
|
This code will expire in 15 minutes. If you didn't
|
|
|
|
request this code, please ignore this email.
|
|
|
|
</EmailText>
|
|
|
|
|
2025-01-04 20:22:01 -05:00
|
|
|
<EmailFooter>
|
2025-01-05 00:06:24 -05:00
|
|
|
<EmailSignature />
|
2025-01-04 20:22:01 -05:00
|
|
|
</EmailFooter>
|
|
|
|
</EmailContainer>
|
2024-12-15 17:47:07 -05:00
|
|
|
</Body>
|
|
|
|
</Tailwind>
|
|
|
|
</Html>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ResourceOTPCode;
|