2024-12-22 16:59:30 -05:00
|
|
|
|
import {
|
|
|
|
|
Body,
|
|
|
|
|
Container,
|
|
|
|
|
Head,
|
|
|
|
|
Heading,
|
|
|
|
|
Html,
|
|
|
|
|
Preview,
|
|
|
|
|
Section,
|
|
|
|
|
Text,
|
|
|
|
|
Tailwind
|
|
|
|
|
} from "@react-email/components";
|
|
|
|
|
import * as React from "react";
|
2024-12-31 18:25:11 -05:00
|
|
|
|
import LetterHead from "./components/LetterHead";
|
2024-12-22 16:59:30 -05:00
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
email: string;
|
|
|
|
|
code: string;
|
|
|
|
|
link: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ResetPasswordCode = ({ email, code, link }: Props) => {
|
2024-12-31 18:25:11 -05:00
|
|
|
|
const previewText = `Your password reset code is ${code}`;
|
2024-12-22 16:59:30 -05:00
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Html>
|
|
|
|
|
<Head />
|
|
|
|
|
<Preview>{previewText}</Preview>
|
|
|
|
|
<Tailwind
|
|
|
|
|
config={{
|
|
|
|
|
theme: {
|
|
|
|
|
extend: {
|
|
|
|
|
colors: {
|
|
|
|
|
primary: "#F97317"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Body className="font-sans">
|
|
|
|
|
<Container className="bg-white border border-solid border-gray-200 p-6 max-w-lg mx-auto my-8 rounded-lg">
|
2024-12-31 18:25:11 -05:00
|
|
|
|
<LetterHead />
|
2024-12-30 23:41:06 -05:00
|
|
|
|
|
2024-12-22 16:59:30 -05:00
|
|
|
|
<Heading className="text-2xl font-semibold text-gray-800 text-center">
|
2024-12-30 23:41:06 -05:00
|
|
|
|
Password Reset Request
|
2024-12-22 16:59:30 -05:00
|
|
|
|
</Heading>
|
|
|
|
|
<Text className="text-base text-gray-700 mt-4">
|
|
|
|
|
Hi {email || "there"},
|
|
|
|
|
</Text>
|
|
|
|
|
<Text className="text-base text-gray-700 mt-2">
|
|
|
|
|
You’ve requested to reset your password. Please{" "}
|
|
|
|
|
<a href={link} className="text-primary">
|
|
|
|
|
click here
|
|
|
|
|
</a>{" "}
|
2024-12-22 17:27:09 -05:00
|
|
|
|
and follow the instructions to reset your password,
|
|
|
|
|
or manually enter the following code:
|
2024-12-22 16:59:30 -05:00
|
|
|
|
</Text>
|
2024-12-30 23:41:06 -05:00
|
|
|
|
<Section className="text-center">
|
2024-12-22 16:59:30 -05:00
|
|
|
|
<Text className="inline-block bg-primary text-xl font-bold text-white py-2 px-4 border border-gray-300 rounded-xl">
|
|
|
|
|
{code}
|
|
|
|
|
</Text>
|
|
|
|
|
</Section>
|
|
|
|
|
<Text className="text-base text-gray-700 mt-2">
|
|
|
|
|
If you didn’t request this, you can safely ignore
|
|
|
|
|
this email.
|
|
|
|
|
</Text>
|
2024-12-22 17:27:09 -05:00
|
|
|
|
<Text className="text-sm text-gray-500 mt-6">
|
|
|
|
|
Best regards,
|
|
|
|
|
<br />
|
|
|
|
|
Fossorial
|
|
|
|
|
</Text>
|
2024-12-22 16:59:30 -05:00
|
|
|
|
</Container>
|
|
|
|
|
</Body>
|
|
|
|
|
</Tailwind>
|
|
|
|
|
</Html>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default ResetPasswordCode;
|