Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

wip email templates

Kiran K4257e7d44808
diff --git a/packages/email/src/templates/bounty-approved.tsx b/packages/email/src/templates/bounty-approved.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/email/src/templates/bounty-rejected.tsx b/packages/email/src/templates/bounty-rejected.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/email/src/templates/bounty-submitted.tsx b/packages/email/src/templates/bounty-submitted.tsx
new file mode 100644
index 0000000000..ac69916c97
--- /dev/null
+++ b/packages/email/src/templates/bounty-submitted.tsx
@@ -0,0 +1,121 @@
+import { cn, DUB_WORDMARK } from "@dub/utils";
+import {
+ Body,
+ Container,
+ Head,
+ Heading,
+ Html,
+ Img,
+ Link,
+ Preview,
+ Section,
+ Tailwind,
+ Text,
+} from "@react-email/components";
+import { Footer } from "../components/footer";
+
+export default function BountySubmitted({
+ bounty = {
+ id: "bounty_1K33NYERM0XZS1HK7C82C77K0",
+ name: "Promote Acme at your campus and earn $500 ",
+ rewardAmount: 50000,
+ type: "performance",
+ },
+ program = {
+ name: "Acme",
+ slug: "acme",
+ supportEmail: "[email protected]",
+ },
+ email = "[email protected]",
+}: {
+ bounty: {
+ id: string;
+ name: string;
+ rewardAmount: number;
+ type: "performance" | "submission";
+ };
+ program: {
+ slug: string;
+ name: string;
+ supportEmail: string;
+ };
+ email: string;
+}) {
+ return (
+ <Html>
+ <Head />
+ <Preview>Bounty submitted</Preview>
+ <Tailwind>
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-8 max-w-[600px] px-8 py-8">
+ <Section className="mt-8">
+ <Img src={DUB_WORDMARK} height="32" alt="Dub" />
+ </Section>
+
+ <Heading className="mx-0 my-8 p-0 text-lg font-medium text-black">
+ Bounty submitted!
+ </Heading>
+
+ <Text className="text-sm leading-5 text-neutral-600">
+ Thanks for submitting proof for the <strong>{bounty.name}</strong>{" "}
+ bounty!
+ </Text>
+
+ <Section className="flex h-[140px] items-center justify-center rounded-lg bg-neutral-100 py-1.5">
+ <BountyThumbnailImage type={bounty.type} />
+ </Section>
+
+ <Text className="text-sm leading-5 text-neutral-600">
+ Once <strong>{program.name}</strong> has verified the submitted
+ proof, the reward will be added to your payouts.
+ </Text>
+
+ <Text className="text-sm leading-5 text-neutral-600">
+ If you have any questions about the program please don’t hesitate
+ to reach out to the <strong>{program.name}</strong> team{" "}
+ <span className="font-semibold text-blue-600">
+ ({program.supportEmail})
+ </span>
+ </Text>
+
+ <Section className="mb-10 mt-6">
+ <Link
+ className="rounded-lg bg-neutral-900 px-6 py-3 text-[13px] font-medium text-white no-underline"
+ href={`https://partners.dub.co/programs/${program.slug}`}
+ >
+ Go to your dashboard
+ </Link>
+ </Section>
+
+ <Footer email={email} />
+ </Container>
+ </Body>
+ </Tailwind>
+ </Html>
+ );
+}
+
+export function BountyThumbnailImage({
+ type,
+ className,
+}: {
+ type: "performance" | "submission";
+ className?: string;
+}) {
+ return (
+ <img
+ {...(type === "performance"
+ ? {
+ src: "https://assets.dub.co/icons/trophy.webp",
+ alt: "Trophy thumbnail",
+ }
+ : {
+ src: "https://assets.dub.co/icons/heart.webp",
+ alt: "Heart thumbnail",
+ })}
+ width={118}
+ height={118}
+ className={cn("size-full object-contain", className)}
+ />
+ );
+}
diff --git a/packages/email/src/templates/new-bounty-published.tsx b/packages/email/src/templates/new-bounty-published.tsx
new file mode 100644
index 0000000000..e69de29bb2