Skip to content

Open source CapCut alternative.

TypeScript

feat(site): move the welcome email links into a P.S. and extract shared email components

David Lec2bc27776c5d
diff --git a/site/src/emails/_components/CommunityPs.tsx b/site/src/emails/_components/CommunityPs.tsx
new file mode 100644
index 00000000..5a124724
--- /dev/null
+++ b/site/src/emails/_components/CommunityPs.tsx
@@ -0,0 +1,23 @@
+import { Link, Text } from "react-email";
+
+export const DISCORD_URL = "https://discord.gg/Xv6qGax7sT";
+export const GITHUB_URL = "https://github.com/DonkeyUseCorp/Donkey";
+
+// The community links as a P.S. under the sign-off of a personal note.
+export function CommunityPs() {
+ return (
+ <Text className="text-[15px] leading-relaxed">
+ P.S.
+ <br />
+ Discord —{" "}
+ <Link href={DISCORD_URL} className="text-[#0F0E0D] underline">
+ {DISCORD_URL}
+ </Link>
+ <br />
+ GitHub —{" "}
+ <Link href={GITHUB_URL} className="text-[#0F0E0D] underline">
+ {GITHUB_URL}
+ </Link>
+ </Text>
+ );
+}
diff --git a/site/src/emails/_components/DonkeyMark.tsx b/site/src/emails/_components/DonkeyMark.tsx
new file mode 100644
index 00000000..818c4561
--- /dev/null
+++ b/site/src/emails/_components/DonkeyMark.tsx
@@ -0,0 +1,10 @@
+import { Img } from "react-email";
+
+// The Donkey Cut mark at the top of an email. `src` is the `cid:` reference in
+// real sends (the sender attaches the bytes from logo.ts) and the data URI in
+// preview.
+export function DonkeyMark({ src }: { src: string }) {
+ return (
+ <Img src={src} alt="Donkey Cut" width="48" height="48" className="mb-4" />
+ );
+}
diff --git a/site/src/emails/welcome.tsx b/site/src/emails/welcome.tsx
index 2cc1d679..7a133b7a 100644
--- a/site/src/emails/welcome.tsx
+++ b/site/src/emails/welcome.tsx
@@ -4,7 +4,6 @@ import {
Head,
Hr,
Html,
- Img,
Link,
Preview,
Tailwind,
@@ -12,6 +11,8 @@ import {
pixelBasedPreset,
} from "react-email";
+import { CommunityPs } from "./_components/CommunityPs";
+import { DonkeyMark } from "./_components/DonkeyMark";
import { DONKEY_LOGO_DATA_URI } from "./_components/logo";
// The one email a new account gets: a personal note from David. Sent by
@@ -46,13 +47,7 @@ export default function WelcomeEmail({
<Tailwind config={{ presets: [pixelBasedPreset] }}>
<Body className="bg-white font-sans text-[#0F0E0D]">
<Container className="mx-auto max-w-[520px] px-6 py-12">
- <Img
- src={logoSrc}
- alt="Donkey Cut"
- width="48"
- height="48"
- className="mb-4"
- />
+ <DonkeyMark src={logoSrc} />
<Text className="text-[15px] leading-relaxed">Hey {name},</Text>
<Text className="text-[15px] leading-relaxed">
Thanks for signing up.
@@ -79,26 +74,6 @@ export default function WelcomeEmail({
GitHub. If you have questions, feedback, or just want to say hi,
join the Discord. I&apos;m there every day.
</Text>
- <Text className="text-[15px] leading-relaxed">
- Discord
- <br />
- <Link
- href="https://discord.gg/Xv6qGax7sT"
- className="text-[#0F0E0D] underline"
- >
- https://discord.gg/Xv6qGax7sT
- </Link>
- </Text>
- <Text className="text-[15px] leading-relaxed">
- GitHub
- <br />
- <Link
- href="https://github.com/DonkeyUseCorp/Donkey"
- className="text-[#0F0E0D] underline"
- >
- https://github.com/DonkeyUseCorp/Donkey
- </Link>
- </Text>
<Text className="text-[15px] leading-relaxed">
This email goes straight to my personal inbox, so feel free to
reply anytime. I read every email.
@@ -110,6 +85,7 @@ export default function WelcomeEmail({
Have a great day!
</Text>
<Text className="text-[15px] leading-relaxed">David</Text>
+ <CommunityPs />
<Hr className="mt-6 border-[#0F0E0D]/15" />
<Text className="text-[12px] leading-relaxed text-[#0F0E0D]/60">
You&apos;re receiving this because you created a Donkey Cut