mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-15 06:38:28 +00:00
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components";
|
|
import { z } from "zod";
|
|
import { Footer } from "./components/Footer";
|
|
import { Image } from "./components/Image";
|
|
import { anchor, container, h1, main, paragraphLight } from "./components/styles";
|
|
|
|
export const InviteEmailSchema = z.object({
|
|
email: z.literal("invite"),
|
|
orgName: z.string(),
|
|
inviterName: z.string().optional(),
|
|
inviterEmail: z.string(),
|
|
inviteLink: z.string().url(),
|
|
});
|
|
|
|
export default function Email({
|
|
orgName,
|
|
inviterName,
|
|
inviterEmail,
|
|
inviteLink,
|
|
}: z.infer<typeof InviteEmailSchema>) {
|
|
return (
|
|
<Html>
|
|
<Head />
|
|
<Preview>{`You've been invited to ${orgName}`}</Preview>
|
|
<Body style={main}>
|
|
<Container style={container}>
|
|
<Text style={h1}>{`You've been invited to ${orgName}`}</Text>
|
|
<Text style={paragraphLight}>
|
|
{inviterName ?? inviterEmail} has invited you to join their organization on Sol.ai.
|
|
</Text>
|
|
<Link
|
|
href={inviteLink}
|
|
target="_blank"
|
|
style={{
|
|
...anchor,
|
|
display: "block",
|
|
marginBottom: "50px",
|
|
}}
|
|
>
|
|
Click here to view the invitation
|
|
</Link>
|
|
|
|
<Image path="/emails/logo-mono.png" width="120" height="22" alt="Sol.ai" />
|
|
<Footer />
|
|
</Container>
|
|
</Body>
|
|
</Html>
|
|
);
|
|
}
|