The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update partner-payout-processed.tsx
Steven Teyd4dde92c41f9
diff --git a/packages/email/src/templates/partner-payout-processed.tsx b/packages/email/src/templates/partner-payout-processed.tsxindex 31550d9948..909213b547 100644--- a/packages/email/src/templates/partner-payout-processed.tsx+++ b/packages/email/src/templates/partner-payout-processed.tsx@@ -24,9 +24,9 @@ export default function PartnerPayoutProcessed({payout = {id: "po_8VuCr2i7WnG65d4TNgZO19fT",amount: 12000,- periodStart: new Date("2024-11-01"),- periodEnd: new Date("2024-11-30"),- method: "connect",+ periodStart: new Date("2026-02-01"),+ periodEnd: new Date("2026-02-01"),+ method: "stablecoin",},}: {email: string;@@ -42,9 +42,8 @@ export default function PartnerPayoutProcessed({method: PartnerPayoutMethod | null;};}) {- const payoutAmountInDollars = currencyFormatter(payout.amount, {- trailingZeroDisplay: "stripIfInteger",- });+ const payoutAmountInDollars = currencyFormatter(payout.amount);+ const STABLECOIN_PAYOUT_FEE_RATE = 0.005;const startDate = payout.periodStart? formatDate(payout.periodStart, {@@ -68,7 +67,7 @@ export default function PartnerPayoutProcessed({if (payout.method === "stablecoin") {statusMessage =- "Your USDC has been sent to your connected crypto wallet. You should receive it within seconds.";+ "Your USDC has been sent to your connected crypto wallet. You should receive it within minutes.";} else if (payout.method === "connect") {statusMessage =payout.amount >= 1000@@ -111,16 +110,45 @@ export default function PartnerPayoutProcessed({{startDate && endDate ? (<>{" "}- for affiliate commissions made from{" "}- <strong className="text-black">{startDate}</strong> to{" "}- <strong className="text-black">{endDate}</strong>.+ for affiliate commissions made+ {startDate === endDate ? (+ <>+ {" "}+ on <strong className="text-black">{startDate}</strong>.+ </>+ ) : (+ <>+ from <strong className="text-black">{startDate}</strong>{" "}+ to <strong className="text-black">{endDate}</strong>.+ </>+ )}</>) : (".")}+ {payout.method === "stablecoin" ? (+ <>+ {" "}+ Since you're using stablecoin payouts, a{" "}+ {STABLECOIN_PAYOUT_FEE_RATE * 100}% fee will be deducted from+ your payout, resulting in a final amount of{" "}+ <strong className="text-black">+ {currencyFormatter(+ payout.amount * (1 - STABLECOIN_PAYOUT_FEE_RATE),+ )}+ </strong>+ .+ </>+ ) : (+ ""+ )}</Text>- <Section className="my-8">+ <Text className="text-sm leading-6 text-neutral-600">+ {statusMessage}+ </Text>++ <Section className="mb-10 mt-8"><LinkclassName="rounded-lg bg-neutral-900 px-4 py-3 text-[12px] font-semibold text-white no-underline"href={`https://partners.dub.co/payouts?payoutId=${payout.id}`}@@ -129,10 +157,6 @@ export default function PartnerPayoutProcessed({</Link></Section>- <Text className="text-sm leading-6 text-neutral-600">- {statusMessage}- </Text>-{payout.method === "connect" && payout.amount < 1000 && (<Text className="text-sm leading-6 text-neutral-600">If you'd like to receive your payout right away, please{" "}