The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update sheet + email
Steven Tey1a3db9972d90
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/invite-partner-sheet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/invite-partner-sheet.tsxindex 2acf5bf7dc..a4a21f5316 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/invite-partner-sheet.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/invite-partner-sheet.tsx@@ -17,7 +17,6 @@ interface InvitePartnerSheetProps {}interface InvitePartnerFormData {- name: string;email: string;linkId: string;}@@ -29,7 +28,6 @@ function InvitePartnerSheetContent({ setIsOpen }: InvitePartnerSheetProps) {const { register, handleSubmit, watch, setValue } =useForm<InvitePartnerFormData>({defaultValues: {- name: "",email: "",linkId: "",},@@ -49,7 +47,6 @@ function InvitePartnerSheetContent({ setIsOpen }: InvitePartnerSheetProps) {await executeAsync({workspaceId: workspaceId!,programId,- name: data.name,email: data.email,linkId: data.linkId,});@@ -74,22 +71,6 @@ function InvitePartnerSheetContent({ setIsOpen }: InvitePartnerSheetProps) {</div><div className="p-6"><div className="flex flex-col gap-4">- <div>- <label htmlFor="name" className="flex items-center space-x-2">- <h2 className="text-sm font-medium text-gray-900">Name</h2>- </label>- <div className="relative mt-2 rounded-md shadow-sm">- <input- {...register("name")}- className="block w-full rounded-md border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm"- placeholder="David"- required- autoFocus- autoComplete="off"- />- </div>- </div>-<div><label htmlFor="email" className="flex items-center space-x-2"><h2 className="text-sm font-medium text-gray-900">Email</h2>@@ -98,7 +79,7 @@ function InvitePartnerSheetContent({ setIsOpen }: InvitePartnerSheetProps) {<input{...register("email")}className="block w-full rounded-md border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm"- placeholder="[email protected]"+ placeholder="[email protected]"requiredtype="email"autoComplete="off"diff --git a/apps/web/emails/partner-invite.tsx b/apps/web/emails/partner-invite.tsxindex 578b2fbcc3..6ff856bf03 100644--- a/apps/web/emails/partner-invite.tsx+++ b/apps/web/emails/partner-invite.tsx@@ -1,4 +1,3 @@-import { DUB_WORDMARK } from "@dub/utils";import {Body,Container,@@ -17,14 +16,14 @@ import Footer from "./components/footer";export default function PartnerInvite({email = "[email protected]",appName = "Dub.co",- programName = "Cal",+ programName = "Acme",+ programLogo = "https://assets.dub.co/logo.png",}: {email: string;appName: string;programName: string;+ programLogo: string | null;}) {- const url = "https://partners.dub.co";-return (<Html><Head />@@ -32,35 +31,31 @@ export default function PartnerInvite({<Tailwind><Body className="mx-auto my-auto bg-white 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">+ <Section className="my-8"><Img- src={DUB_WORDMARK}- height="40"+ src={programLogo || "https://assets.dub.co/logo.png"}+ height="32"alt={appName}- className="mx-auto my-0"/></Section>- <Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">- Sign up for {programName}+ <Heading className="mx-0 p-0 text-lg font-medium text-black">+ {programName} invited you to join Dub Partners</Heading>- <Section className="mb-8 text-center">+ <Text className="text-sm leading-6 text-gray-600">+ Acme uses Dub to power their partnership programs and wants to+ partner with great people like yourself!+ </Text>++ <Section className="mb-12 mt-8"><Link- className="rounded-full bg-black px-6 py-3 text-center text-[12px] font-semibold text-white no-underline"- href={url}+ className="rounded-md bg-neutral-900 px-4 py-3 text-[12px] font-medium text-white no-underline"+ href="https://partners.dub.co">- Learn More+ Accept Invite</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>diff --git a/apps/web/lib/actions/invite-partner.ts b/apps/web/lib/actions/invite-partner.tsindex cd296fa5f2..6b0010c7f7 100644--- a/apps/web/lib/actions/invite-partner.ts+++ b/apps/web/lib/actions/invite-partner.ts@@ -13,7 +13,6 @@ import { authActionClient } from "./safe-action";const schema = createProgramSchema.partial().extend({workspaceId: z.string(),programId: z.string(),- name: z.string().trim().min(1).max(100),email: z.string().trim().email().min(1).max(100),linkId: z.string().trim(),});@@ -22,7 +21,7 @@ export const invitePartnerAction = authActionClient.schema(schema).action(async ({ parsedInput, ctx }) => {const { workspace } = ctx;- const { name, email, linkId, programId } = parsedInput;+ const { email, linkId, programId } = parsedInput;const program = await getProgramOrThrow({workspaceId: workspace.id,@@ -67,7 +66,6 @@ export const invitePartnerAction = authActionClientconst result = await prisma.programInvite.create({data: {- name,email,linkId,programId,@@ -86,6 +84,7 @@ export const invitePartnerAction = authActionClientemail,appName: `${process.env.NEXT_PUBLIC_APP_NAME}`,programName: program.name,+ programLogo: program.logo,}),});diff --git a/apps/web/prisma/schema/program.prisma b/apps/web/prisma/schema/program.prismaindex 784e53d5db..a14354c806 100644--- a/apps/web/prisma/schema/program.prisma+++ b/apps/web/prisma/schema/program.prisma@@ -91,7 +91,6 @@ model ProgramResource {model ProgramInvite {id String @id @default(cuid())programId String- name Stringemail StringlinkId String @uniquecreatedAt DateTime @default(now())