Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(email): add first-view email template

Richie McIlroy935d152fb1ca
diff --git a/packages/database/emails/first-view.tsx b/packages/database/emails/first-view.tsx
new file mode 100644
index 000000000..77f37eb3f
--- /dev/null
+++ b/packages/database/emails/first-view.tsx
@@ -0,0 +1,75 @@
+import { CAP_LOGO_URL } from "@cap/utils";
+import {
+ Body,
+ Container,
+ Head,
+ Heading,
+ Html,
+ Img,
+ Link,
+ Preview,
+ Section,
+ Tailwind,
+ Text,
+} from "@react-email/components";
+import Footer from "./components/Footer";
+
+export function FirstView({
+ email = "",
+ url = "",
+ videoName = "",
+ viewerName = "",
+}: {
+ email: string;
+ url: string;
+ videoName: string;
+ viewerName: string;
+ isAnonymous: boolean;
+}) {
+ return (
+ <Html>
+ <Head />
+ <Preview>Your Cap "{videoName}" just got its first view!</Preview>
+ <Tailwind>
+ <Body className="mx-auto my-auto bg-gray-1 font-sans">
+ <Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
+ <Section className="mt-8">
+ <Img
+ src={CAP_LOGO_URL}
+ width="40"
+ height="40"
+ alt="Cap"
+ className="mx-auto my-0"
+ />
+ </Section>
+ <Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">
+ Your Cap just got its first view!
+ </Heading>
+ <Text className="text-sm leading-6 text-black">
+ Your video "{videoName}" was just viewed by{" "}
+ <span className="font-medium">{viewerName}</span>.
+ </Text>
+ <Text className="text-sm leading-6 text-black">
+ Click the button below to see your Cap.
+ </Text>
+ <Section className="my-8 text-center">
+ <Link
+ className="rounded-full bg-black px-6 py-3 text-center text-[12px] font-semibold text-white no-underline"
+ href={url}
+ >
+ View Your Cap
+ </Link>
+ </Section>
+ <Text className="text-sm leading-6 text-black">
+ or copy and paste this URL into your browser:
+ </Text>
+ <Text className="max-w-sm flex-wrap break-words font-medium text-purple-600 no-underline">
+ {url.replace(/^https?:\/\//, "")}
+ </Text>
+ <Footer email={email} />
+ </Container>
+ </Body>
+ </Tailwind>
+ </Html>
+ );
+}