The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
improve auth layouts, update nav copy
Steven Teyb9b157a5da3b
diff --git a/apps/web/app/(ee)/admin.dub.co/(auth)/login/page.tsx b/apps/web/app/(ee)/admin.dub.co/(auth)/login/page.tsxindex 71b4b96dd2..af2114e1ad 100644--- a/apps/web/app/(ee)/admin.dub.co/(auth)/login/page.tsx+++ b/apps/web/app/(ee)/admin.dub.co/(auth)/login/page.tsx@@ -1 +1 @@-export { default } from "../../../../app.dub.co/(auth)/login/page";+export { default } from "../../../../app.dub.co/(auth-marketing)/login/page";diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsxdeleted file mode 100644index e55f4a375e..0000000000--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsx+++ /dev/null@@ -1,97 +0,0 @@-"use client";--import { PostbackProps } from "@/lib/types";-import { PageContent } from "@/ui/layout/page-content";-import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper";-import { useAddEditPostbackModal } from "@/ui/postbacks/add-edit-postback-modal";-import { PostbackCard } from "@/ui/postbacks/postback-card";-import { PostbackPlaceholder } from "@/ui/postbacks/postback-placeholder";-import { usePostbackSecretModal } from "@/ui/postbacks/postback-secret-modal";-import EmptyState from "@/ui/shared/empty-state";-import { EmptyState as EmptyStateBlock } from "@dub/ui";-import { fetcher } from "@dub/utils";-import { AlertCircle, Webhook } from "lucide-react";-import useSWR from "swr";-import { AddPostbackButton } from "./add-postback-button";--export function PostbacksPageClient() {- const {- data: postbacks,- error,- isLoading,- mutate,- } = useSWR<PostbackProps[]>("/api/partner-profile/postbacks", fetcher, {- keepPreviousData: true,- });-- const { openPostbackSecretModal, PostbackSecretModal } =- usePostbackSecretModal();-- const { openAddPostbackModal, AddEditPostbackModal } =- useAddEditPostbackModal(() => mutate(), openPostbackSecretModal);-- return (- <>- <PageContent- title="Postbacks"- titleInfo={{- title:- "Receive HTTP requests when events like leads, sales, or commissions occur in your partner programs.",- href: "https://d.to/postbacks",- }}- controls={<AddPostbackButton onClick={openAddPostbackModal} />}- >- <PageWidthWrapper>- <div className="grid gap-5">- <div className="animate-fade-in">- {isLoading ? (- <div className="grid grid-cols-1 gap-3">- {Array.from({ length: 3 }).map((_, idx) => (- <PostbackPlaceholder key={idx} />- ))}- </div>- ) : error ? (- <div className="flex flex-col items-center gap-4 rounded-xl border border-neutral-200 py-10">- <EmptyStateBlock- icon={AlertCircle}- title="Failed to load postbacks"- description={- error instanceof Error- ? error.message- : "Something went wrong. Please try again."- }- >- <button- type="button"- onClick={() => mutate()}- className="flex h-8 items-center justify-center gap-2 rounded-md border border-neutral-200 bg-white px-4 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50"- >- Try again- </button>- </EmptyStateBlock>- </div>- ) : postbacks && postbacks.length > 0 ? (- <div className="grid grid-cols-1 gap-3">- {postbacks.map((postback) => (- <PostbackCard key={postback.id} {...postback} />- ))}- </div>- ) : (- <div className="flex flex-col items-center gap-4 rounded-xl border border-neutral-200 py-10">- <EmptyState- icon={Webhook}- title="You haven't set up any postbacks yet."- description="Postbacks allow you to receive HTTP requests when events like leads, sales, or commissions occur in your partner programs."- learnMore="https://d.to/postbacks"- />- </div>- )}- </div>- </div>- </PageWidthWrapper>- </PageContent>- {AddEditPostbackModal}- {PostbackSecretModal}- </>- );-}diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page.tsxindex 379a1b6940..828e3116b1 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page.tsx@@ -1,5 +1,97 @@-import { PostbacksPageClient } from "./page-client";+"use client";++import { PostbackProps } from "@/lib/types";+import { PageContent } from "@/ui/layout/page-content";+import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper";+import { useAddEditPostbackModal } from "@/ui/postbacks/add-edit-postback-modal";+import { PostbackCard } from "@/ui/postbacks/postback-card";+import { PostbackPlaceholder } from "@/ui/postbacks/postback-placeholder";+import { usePostbackSecretModal } from "@/ui/postbacks/postback-secret-modal";+import EmptyState from "@/ui/shared/empty-state";+import { EmptyState as EmptyStateBlock } from "@dub/ui";+import { fetcher } from "@dub/utils";+import { AlertCircle, Webhook } from "lucide-react";+import useSWR from "swr";+import { AddPostbackButton } from "./add-postback-button";export default function PostbacksPage() {- return <PostbacksPageClient />;+ const {+ data: postbacks,+ error,+ isLoading,+ mutate,+ } = useSWR<PostbackProps[]>("/api/partner-profile/postbacks", fetcher, {+ keepPreviousData: true,+ });++ const { openPostbackSecretModal, PostbackSecretModal } =+ usePostbackSecretModal();++ const { openAddPostbackModal, AddEditPostbackModal } =+ useAddEditPostbackModal(() => mutate(), openPostbackSecretModal);++ return (+ <>+ <PageContent+ title="Postbacks"+ titleInfo={{+ title:+ "Receive HTTP requests when events like leads, sales, or commissions occur in your partner programs.",+ href: "https://d.to/postbacks",+ }}+ controls={<AddPostbackButton onClick={openAddPostbackModal} />}+ >+ <PageWidthWrapper>+ <div className="grid gap-5">+ <div className="animate-fade-in">+ {isLoading ? (+ <div className="grid grid-cols-1 gap-3">+ {Array.from({ length: 3 }).map((_, idx) => (+ <PostbackPlaceholder key={idx} />+ ))}+ </div>+ ) : error ? (+ <div className="flex flex-col items-center gap-4 rounded-xl border border-neutral-200 py-10">+ <EmptyStateBlock+ icon={AlertCircle}+ title="Failed to load postbacks"+ description={+ error instanceof Error+ ? error.message+ : "Something went wrong. Please try again."+ }+ >+ <button+ type="button"+ onClick={() => mutate()}+ className="flex h-8 items-center justify-center gap-2 rounded-md border border-neutral-200 bg-white px-4 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50"+ >+ Try again+ </button>+ </EmptyStateBlock>+ </div>+ ) : postbacks && postbacks.length > 0 ? (+ <div className="grid grid-cols-1 gap-3">+ {postbacks.map((postback) => (+ <PostbackCard key={postback.id} {...postback} />+ ))}+ </div>+ ) : (+ <div className="flex flex-col items-center gap-4 rounded-xl border border-neutral-200 py-10">+ <EmptyState+ icon={Webhook}+ title="You haven't set up any postbacks yet."+ description="Postbacks allow you to receive HTTP requests when events like leads, sales, or commissions occur in your partner programs."+ learnMore="https://d.to/postbacks"+ />+ </div>+ )}+ </div>+ </div>+ </PageWidthWrapper>+ </PageContent>+ {AddEditPostbackModal}+ {PostbackSecretModal}+ </>+ );}diff --git a/apps/web/app/app.dub.co/(auth)/layout.tsx b/apps/web/app/app.dub.co/(auth)/layout.tsxindex d3d14d8ab1..913300544c 100644--- a/apps/web/app/app.dub.co/(auth)/layout.tsx+++ b/apps/web/app/app.dub.co/(auth)/layout.tsx@@ -2,68 +2,61 @@ import Toolbar from "@/ui/layout/toolbar/toolbar";import { Grid, Wordmark } from "@dub/ui";import { cn } from "@dub/utils";import { ReactNode } from "react";-import { SidePanel } from "./side-panel";export default function AuthLayout({ children }: { children: ReactNode }) {return (<><Toolbar />- <div className="relative grid min-h-[100dvh] min-h-screen grid-cols-1 min-[900px]:grid-cols-[minmax(0,1fr)_440px] lg:grid-cols-[minmax(0,1fr)_595px]">- {/* Left: Main auth content */}- <div className="relative">- <div className="absolute inset-0 isolate overflow-hidden bg-white">- {/* Grid */}+ <div className="relative min-h-[100dvh]">+ <div className="absolute inset-0 isolate overflow-hidden bg-white">+ {/* Grid */}+ <div+ className={cn(+ "absolute inset-y-0 left-1/2 w-[1200px] -translate-x-1/2",+ "[mask-composite:intersect] [mask-image:linear-gradient(black,transparent_320px),linear-gradient(90deg,transparent,black_5%,black_95%,transparent)]",+ )}+ >+ <Grid+ cellSize={60}+ patternOffset={[0.75, 0]}+ className="text-neutral-200"+ />+ </div>++ {/* Gradient */}+ {[...Array(2)].map((_, idx) => (<div+ key={idx}className={cn(- "absolute inset-y-0 left-1/2 w-[1200px] -translate-x-1/2",- "[mask-composite:intersect] [mask-image:linear-gradient(black,transparent_320px),linear-gradient(90deg,transparent,black_5%,black_95%,transparent)]",+ "absolute left-1/2 top-6 size-[80px] -translate-x-1/2 -translate-y-1/2 scale-x-[1.6]",+ idx === 0 ? "mix-blend-overlay" : "opacity-10",)}>- <Grid- cellSize={60}- patternOffset={[0.75, 0]}- className="text-neutral-200"- />+ {[...Array(idx === 0 ? 2 : 1)].map((_, idx) => (+ <div+ key={idx}+ className={cn(+ "absolute -inset-16 mix-blend-overlay blur-[50px] saturate-[2]",+ "bg-[conic-gradient(from_90deg,#F00_5deg,#EAB308_63deg,#5CFF80_115deg,#1E00FF_170deg,#855AFC_220deg,#3A8BFD_286deg,#F00_360deg)]",+ )}+ />+ ))}</div>-- {/* Gradient */}- {[...Array(2)].map((_, idx) => (- <div- key={idx}- className={cn(- "absolute left-1/2 top-6 size-[80px] -translate-x-1/2 -translate-y-1/2 scale-x-[1.6]",- idx === 0 ? "mix-blend-overlay" : "opacity-10",- )}- >- {[...Array(idx === 0 ? 2 : 1)].map((_, idx) => (- <div- key={idx}- className={cn(- "absolute -inset-16 mix-blend-overlay blur-[50px] saturate-[2]",- "bg-[conic-gradient(from_90deg,#F00_5deg,#EAB308_63deg,#5CFF80_115deg,#1E00FF_170deg,#855AFC_220deg,#3A8BFD_286deg,#F00_360deg)]",- )}- />- ))}- </div>- ))}- </div>-- <div className="relative flex min-h-[100dvh] min-h-screen w-full justify-center">- <a- href="https://dub.co"- target="_blank"- rel="noopener noreferrer"- className="absolute left-1/2 top-4 z-10 -translate-x-1/2"- >- <Wordmark className="h-8" />- </a>- {children}- </div>+ ))}</div>- {/* Right: Side panel - hidden on mobile */}- <SidePanel />+ <div className="relative flex min-h-[100dvh] min-h-screen w-full justify-center">+ <a+ href="https://dub.co"+ target="_blank"+ rel="noopener noreferrer"+ className="absolute left-1/2 top-4 z-10 -translate-x-1/2"+ >+ <Wordmark className="h-8" />+ </a>+ {children}+ </div></div></>);diff --git a/apps/web/app/app.dub.co/(auth)/customer-logos.tsx b/apps/web/app/app.dub.co/(auth-marketing)/customer-logos.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(auth)/customer-logos.tsxrename to apps/web/app/app.dub.co/(auth-marketing)/customer-logos.tsxdiff --git a/apps/web/app/app.dub.co/(auth-marketing)/layout.tsx b/apps/web/app/app.dub.co/(auth-marketing)/layout.tsxnew file mode 100644index 0000000000..6e509c8240--- /dev/null+++ b/apps/web/app/app.dub.co/(auth-marketing)/layout.tsx@@ -0,0 +1,74 @@+import Toolbar from "@/ui/layout/toolbar/toolbar";+import { Grid, Wordmark } from "@dub/ui";+import { cn } from "@dub/utils";+import { ReactNode } from "react";+import { SidePanel } from "./side-panel";++export default function AuthMarketingLayout({+ children,+}: {+ children: ReactNode;+}) {+ return (+ <>+ <Toolbar />++ <div className="relative grid min-h-[100dvh] grid-cols-1 min-[900px]:grid-cols-[minmax(0,1fr)_440px] lg:grid-cols-[minmax(0,1fr)_595px]">+ {/* Left: Main auth content */}+ <div className="relative">+ <div className="absolute inset-0 isolate overflow-hidden bg-white">+ {/* Grid */}+ <div+ className={cn(+ "absolute inset-y-0 left-1/2 w-[1200px] -translate-x-1/2",+ "[mask-composite:intersect] [mask-image:linear-gradient(black,transparent_320px),linear-gradient(90deg,transparent,black_5%,black_95%,transparent)]",+ )}+ >+ <Grid+ cellSize={60}+ patternOffset={[0.75, 0]}+ className="text-neutral-200"+ />+ </div>++ {/* Gradient */}+ {[...Array(2)].map((_, idx) => (+ <div+ key={idx}+ className={cn(+ "absolute left-1/2 top-6 size-[80px] -translate-x-1/2 -translate-y-1/2 scale-x-[1.6]",+ idx === 0 ? "mix-blend-overlay" : "opacity-10",+ )}+ >+ {[...Array(idx === 0 ? 2 : 1)].map((_, idx) => (+ <div+ key={idx}+ className={cn(+ "absolute -inset-16 mix-blend-overlay blur-[50px] saturate-[2]",+ "bg-[conic-gradient(from_90deg,#F00_5deg,#EAB308_63deg,#5CFF80_115deg,#1E00FF_170deg,#855AFC_220deg,#3A8BFD_286deg,#F00_360deg)]",+ )}+ />+ ))}+ </div>+ ))}+ </div>++ <div className="relative flex min-h-[100dvh] min-h-screen w-full justify-center">+ <a+ href="https://dub.co"+ target="_blank"+ rel="noopener noreferrer"+ className="absolute left-1/2 top-4 z-10 -translate-x-1/2"+ >+ <Wordmark className="h-8" />+ </a>+ {children}+ </div>+ </div>++ {/* Right: Side panel - hidden on mobile */}+ <SidePanel />+ </div>+ </>+ );+}diff --git a/apps/web/app/app.dub.co/(auth)/login/page.tsx b/apps/web/app/app.dub.co/(auth-marketing)/login/page.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(auth)/login/page.tsxrename to apps/web/app/app.dub.co/(auth-marketing)/login/page.tsxdiff --git a/apps/web/app/app.dub.co/(auth)/register/page-client.tsx b/apps/web/app/app.dub.co/(auth-marketing)/register/page-client.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(auth)/register/page-client.tsxrename to apps/web/app/app.dub.co/(auth-marketing)/register/page-client.tsxdiff --git a/apps/web/app/app.dub.co/(auth)/register/page.tsx b/apps/web/app/app.dub.co/(auth-marketing)/register/page.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(auth)/register/page.tsxrename to apps/web/app/app.dub.co/(auth-marketing)/register/page.tsxdiff --git a/apps/web/app/app.dub.co/(auth)/side-panel.tsx b/apps/web/app/app.dub.co/(auth-marketing)/side-panel.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(auth)/side-panel.tsxrename to apps/web/app/app.dub.co/(auth-marketing)/side-panel.tsxdiff --git a/apps/web/ui/modals/invite-code-modal.tsx b/apps/web/ui/modals/invite-code-modal.tsxindex ba83691c94..41daedf49e 100644--- a/apps/web/ui/modals/invite-code-modal.tsx+++ b/apps/web/ui/modals/invite-code-modal.tsx@@ -33,7 +33,8 @@ function InviteCodeModal({<div className="space-y-2 border-b border-neutral-200 px-4 py-4 sm:px-6"><h3 className="text-lg font-medium">Invite Link</h3><p className="text-sm text-neutral-500">- Allow other people to join your workspace through the link below.+ Allow other people to join your workspace through the link below (not+ recommended for security).</p></div>diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex 8601e6174c..cd5063ebec 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -1,7 +1,7 @@{"name": "@dub/ui","description": "UI components for Dub",- "version": "0.3.7",+ "version": "0.3.8","sideEffects": false,"main": "./dist/index.js","module": "./dist/index.mjs",diff --git a/packages/ui/src/nav/content/product-content.tsx b/packages/ui/src/nav/content/product-content.tsxindex 607b6c1e4e..1eda2f9f19 100644--- a/packages/ui/src/nav/content/product-content.tsx+++ b/packages/ui/src/nav/content/product-content.tsx@@ -57,7 +57,7 @@ const products = [const largeLinks = [{title: "Dub Integrations",- description: "Enhance your short links",+ description: "Connect Dub with your favorite tools",href: "/integrations",graphic: (<div className="absolute -right-4 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80">@@ -70,8 +70,8 @@ const largeLinks = [),},{- title: "Dub API",- description: "Unlock further capabilities",+ title: "Dub API & MCP",+ description: "Connect your agent to Dub",href: "/docs/api-reference/introduction",graphic: (<div className="absolute -right-4 top-2.5 h-[180px] w-[240px] [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-60">