2024-11-03 17:28:12 -05:00
|
|
|
|
import {
|
|
|
|
|
Body,
|
|
|
|
|
Container,
|
|
|
|
|
Head,
|
|
|
|
|
Heading,
|
|
|
|
|
Html,
|
|
|
|
|
Preview,
|
|
|
|
|
Section,
|
|
|
|
|
Text,
|
|
|
|
|
Tailwind,
|
2024-12-22 17:27:09 -05:00
|
|
|
|
Button
|
2024-11-03 17:28:12 -05:00
|
|
|
|
} from "@react-email/components";
|
|
|
|
|
import * as React from "react";
|
|
|
|
|
|
|
|
|
|
interface SendInviteLinkProps {
|
|
|
|
|
email: string;
|
|
|
|
|
inviteLink: string;
|
|
|
|
|
orgName: string;
|
|
|
|
|
inviterName?: string;
|
|
|
|
|
expiresInDays: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const SendInviteLink = ({
|
|
|
|
|
email,
|
|
|
|
|
inviteLink,
|
|
|
|
|
orgName,
|
|
|
|
|
inviterName,
|
2024-12-22 17:27:09 -05:00
|
|
|
|
expiresInDays
|
2024-11-03 17:28:12 -05:00
|
|
|
|
}: SendInviteLinkProps) => {
|
|
|
|
|
const previewText = `${inviterName} invited to join ${orgName}`;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Html>
|
|
|
|
|
<Head />
|
|
|
|
|
<Preview>{previewText}</Preview>
|
2024-12-22 17:27:09 -05:00
|
|
|
|
<Tailwind
|
|
|
|
|
config={{
|
|
|
|
|
theme: {
|
|
|
|
|
extend: {
|
|
|
|
|
colors: {
|
|
|
|
|
primary: "#F97317"
|
|
|
|
|
}
|
2024-11-28 00:11:13 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-22 17:27:09 -05:00
|
|
|
|
}}
|
|
|
|
|
>
|
2024-11-03 17:28:12 -05:00
|
|
|
|
<Body className="font-sans">
|
2024-11-28 00:11:13 -05:00
|
|
|
|
<Container className="bg-white border border-solid border-gray-200 p-6 max-w-lg mx-auto my-8 rounded-lg">
|
2024-11-03 17:28:12 -05:00
|
|
|
|
<Heading className="text-2xl font-semibold text-gray-800 text-center">
|
2024-11-08 00:03:54 -05:00
|
|
|
|
You're invited to join a Fossorial organization
|
2024-11-03 17:28:12 -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 been invited to join the organization{" "}
|
|
|
|
|
{orgName}
|
2024-11-08 00:03:54 -05:00
|
|
|
|
{inviterName ? ` by ${inviterName}.` : "."} Please
|
2024-11-03 17:28:12 -05:00
|
|
|
|
access the link below to accept the invite.
|
|
|
|
|
</Text>
|
|
|
|
|
<Text className="text-base text-gray-700 mt-2">
|
|
|
|
|
This invite will expire in{" "}
|
2024-11-08 00:03:54 -05:00
|
|
|
|
<b>
|
|
|
|
|
{expiresInDays}{" "}
|
|
|
|
|
{expiresInDays === "1" ? "day" : "days"}.
|
|
|
|
|
</b>
|
2024-11-03 17:28:12 -05:00
|
|
|
|
</Text>
|
|
|
|
|
<Section className="text-center my-6">
|
|
|
|
|
<Button
|
|
|
|
|
href={inviteLink}
|
2024-11-28 00:11:13 -05:00
|
|
|
|
className="rounded-lg bg-primary px-[12px] py-[9px] text-center font-semibold text-white cursor-pointer"
|
2024-11-03 17:28:12 -05:00
|
|
|
|
>
|
|
|
|
|
Accept invitation to {orgName}
|
|
|
|
|
</Button>
|
|
|
|
|
</Section>
|
2024-12-22 17:27:09 -05:00
|
|
|
|
|
|
|
|
|
<Text className="text-sm text-gray-500 mt-6">
|
|
|
|
|
Best regards,
|
|
|
|
|
<br />
|
|
|
|
|
Fossorial
|
|
|
|
|
</Text>
|
2024-11-03 17:28:12 -05:00
|
|
|
|
</Container>
|
|
|
|
|
</Body>
|
|
|
|
|
</Tailwind>
|
|
|
|
|
</Html>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default SendInviteLink;
|