The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
WIP partner links
Tim Wilson0de754bad136
diff --git a/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts b/apps/web/app/api/partner-profile/programs/[programId]/links/route.tsindex ef65a87abd..298d4858e2 100644--- a/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts+++ b/apps/web/app/api/partner-profile/programs/[programId]/links/route.ts@@ -3,7 +3,7 @@ import { withPartnerProfile } from "@/lib/auth/partner";import { PartnerLinkSchema } from "@/lib/zod/schemas/programs";import { NextResponse } from "next/server";-// GET /api/partner-profile/programs/[programId]/earnings/timeseries - get timeseries chart for a partner's earnings+// GET /api/partner-profile/programs/[programId]/links - get a partner's links in a programexport const GET = withPartnerProfile(async ({ partner, params }) => {const { links } = await getProgramEnrollmentOrThrow({partnerId: partner.id,diff --git a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page-client.tsx b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page-client.tsxnew file mode 100644index 0000000000..4ca28deb23--- /dev/null+++ b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page-client.tsx@@ -0,0 +1,5 @@+"use client";++export function ProgramLinksPageClient() {+ return "links";+}diff --git a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page.tsx b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page.tsxindex e89e7d6b6d..5943ac4905 100644--- a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page.tsx+++ b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/links/page.tsx@@ -1,34 +1,13 @@import { PageContent } from "@/ui/layout/page-content";-import { AnimatedEmptyState } from "@/ui/shared/animated-empty-state";-import {- CursorRays,- Hyperlink,- InvoiceDollar,- MaxWidthWrapper,- UserCheck,-} from "@dub/ui";+import { MaxWidthWrapper } from "@dub/ui";+import { ProgramLinksPageClient } from "./page-client";export default function ProgramLinks() {return (<PageContent title="Links" hideReferButton><MaxWidthWrapper>- <AnimatedEmptyState- title="Links"- description="Create additional partner links and view more details about each one"- cardContent={- <>- <Hyperlink className="size-4 text-neutral-700" />- <div className="h-2.5 w-24 min-w-0 rounded-sm bg-neutral-200" />- <div className="xs:flex hidden grow items-center justify-end gap-1.5 text-neutral-500">- <CursorRays className="size-3.5" />- <UserCheck className="size-3.5" />- <InvoiceDollar className="size-3.5" />- </div>- </>- }- pillContent="Coming soon"- />+ <ProgramLinksPageClient /></MaxWidthWrapper></PageContent>);