The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Workspace and partners auth page updates (#4524)
Marcus Farrellb8c23a39c149
diff --git a/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/program-logos.tsx b/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/program-logos.tsxindex 9d058c8916..0bd086bae6 100644--- a/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/program-logos.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/program-logos.tsx@@ -1,10 +1,13 @@import { ProgressiveBlur } from "@dub/ui";import { cn } from "@dub/utils";-const LOGO_COUNT = 13;+// Number of logos in the sprite sheet+const LOGO_COUNT = 23;+// Logos shown per row (a random subset of the sprite)+const VISIBLE_PER_ROW = 12;const ROW_COUNT = 4;-// Randomly shuffle the logos in each row+// Randomly shuffle the logos and pick a subset for each rowconst ROWS = [...Array(ROW_COUNT)].map(() => {const cols = [...Array(LOGO_COUNT)].map((_, col) => col);@@ -21,7 +24,7 @@ const ROWS = [...Array(ROW_COUNT)].map(() => {];}- return cols;+ return cols.slice(0, VISIBLE_PER_ROW);});const BLUR_STEPS = 5;@@ -77,7 +80,7 @@ export function ProgramLogos() {className="size-[4.5rem] rounded-full"style={{backgroundImage:- "url(https://assets.dub.co/misc/partner-auth-logos.png)",+ "url(https://assets.dub.co/cms/partner-auth-logo-grid.png)",backgroundSize: `${LOGO_COUNT * 100}%`,backgroundPositionX:(LOGO_COUNT - (logoIndex % LOGO_COUNT)) * 100 +diff --git a/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/side-panel.tsx b/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/side-panel.tsxindex c5bc269e6b..86ef764e89 100644--- a/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/side-panel.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(auth-login-register)/side-panel.tsx@@ -49,16 +49,9 @@ export function SidePanel({<><div className="flex flex-col gap-6 px-4 lg:px-10"><p className="text-content-default max-w-[370px] text-pretty text-xl font-medium">- Join thousands of others who have earned over $10,000,000 on Dub+ Join thousands of others who have earned over $25,000,000 on Dubpartnering with world-class companies.</p>- <Link- target="_blank"- href="https://dub.co/blog/10m-payouts"- className="text-content-emphasis flex h-8 w-fit items-center rounded-lg bg-black/5 px-3 text-sm font-medium transition-[transform,background-color] duration-75 hover:bg-black/10 active:scale-[0.98]"- >- Read more- </Link></div><div className="w-full grow basis-0">diff --git a/apps/web/app/app.dub.co/(auth-marketing)/customer-carousel.tsx b/apps/web/app/app.dub.co/(auth-marketing)/customer-carousel.tsxnew file mode 100644index 0000000000..dd75836717--- /dev/null+++ b/apps/web/app/app.dub.co/(auth-marketing)/customer-carousel.tsx@@ -0,0 +1,169 @@+"use client";++import { AnimatePresence, motion } from "motion/react";+import Link from "next/link";+import { useState } from "react";++const AUTO_ADVANCE_MS = 4000;+const EASE_OUT = [0.23, 1, 0.32, 1] as const;+// Logos are dark on assets.dub.co; this filter renders them white+const WHITE_LOGO = "brightness(0) invert(1)";++const CUSTOMERS: {+ name: string;+ slug: string;+ logo: string;+ image: string;+ headline: string;+ /** Tint color for the bottom gradient */+ color: string;+}[] = [+ {+ name: "Framer",+ slug: "framer",+ logo: "https://assets.dub.co/companies/framer.svg",+ image: "https://assets.dub.co/cms/framer-thumbnail.jpg",+ headline:+ "Learn how Framer manages $900K+ in monthly affiliate payouts with Dub",+ color: "#0088FF",+ },+ {+ name: "Wispr Flow",+ slug: "wisprflow",+ logo: "https://assets.dub.co/companies/wisprflow.svg",+ image: "https://assets.dub.co/cms/wisprflow-cover2.jpg",+ headline: "Learn how Wispr Flow reached millions more users with Dub",+ color: "#024F46",+ },+ {+ name: "Chatbase",+ slug: "chatbase",+ logo: "https://assets.dub.co/companies/chatbase.svg",+ image: "https://assets.dub.co/cms/chatbase-cover.jpg",+ headline:+ "Learn how Chatbase migrated from Rewardful and increased affiliate revenue by 318%",+ color: "#D85AC8",+ },+ {+ name: "Tella",+ slug: "tella",+ logo: "https://assets.dub.co/companies/tella.svg",+ image: "https://assets.dub.co/cms/tella-thumbnail.jpg",+ headline:+ "Learn how Tella increased affiliate revenue by 38% by switching from Rewardful to Dub",+ color: "#8278FA",+ },+];++export function CustomerCarousel() {+ const [index, setIndex] = useState(0);+ const customer = CUSTOMERS[index];++ const goTo = (next: number) => setIndex(next % CUSTOMERS.length);++ return (+ <div className="relative h-[452px] w-full max-w-[481px] overflow-hidden rounded-xl bg-neutral-900">+ {/* Photo */}+ <AnimatePresence initial={false}>+ <motion.img+ key={customer.slug}+ src={customer.image}+ alt={customer.name}+ initial={{ opacity: 0, scale: 1.04 }}+ animate={{ opacity: 1, scale: 1 }}+ exit={{ opacity: 0 }}+ transition={{ duration: 0.6, ease: EASE_OUT }}+ className="absolute inset-x-0 top-0 h-[360px] w-full object-cover"+ />+ </AnimatePresence>++ {/* Fade photo into the dark base */}+ <div className="pointer-events-none absolute inset-x-0 bottom-[102px] h-[171px] bg-gradient-to-b from-neutral-900/0 to-neutral-900" />+ <div className="pointer-events-none absolute inset-x-0 bottom-0 h-[103px] bg-neutral-900" />++ {/* Customer tint */}+ <AnimatePresence initial={false}>+ <motion.div+ key={customer.slug}+ initial={{ opacity: 0 }}+ animate={{ opacity: 0.5 }}+ exit={{ opacity: 0 }}+ transition={{ duration: 0.6, ease: EASE_OUT }}+ className="pointer-events-none absolute -inset-x-16 -bottom-8 h-[300px] -rotate-6 blur-2xl"+ style={{+ background: `linear-gradient(to bottom, transparent 20%, ${customer.color})`,+ }}+ />+ </AnimatePresence>++ {/* Copy */}+ <div className="absolute bottom-[60px] left-6 right-6 flex max-w-[345px] flex-col gap-6">+ <AnimatePresence initial={false} mode="popLayout">+ <motion.div key={customer.slug} className="flex flex-col gap-3">+ <motion.img+ src={customer.logo}+ alt={customer.name}+ initial={{ opacity: 0, y: 12, filter: `${WHITE_LOGO} blur(4px)` }}+ animate={{ opacity: 1, y: 0, filter: `${WHITE_LOGO} blur(0px)` }}+ exit={{ opacity: 0, y: -8, filter: `${WHITE_LOGO} blur(4px)` }}+ transition={{ duration: 0.45, ease: EASE_OUT, delay: 0.04 }}+ className="h-7 w-auto self-start"+ />+ <motion.p+ initial={{ opacity: 0, y: 12, filter: "blur(4px)" }}+ animate={{ opacity: 1, y: 0, filter: "blur(0px)" }}+ exit={{ opacity: 0, y: -8, filter: "blur(4px)" }}+ transition={{ duration: 0.45, ease: EASE_OUT }}+ className="text-pretty text-base font-medium leading-6 tracking-[-0.02em] text-white"+ >+ {customer.headline}+ </motion.p>+ </motion.div>+ </AnimatePresence>++ <Link+ href={`https://dub.co/customers/${customer.slug}`}+ target="_blank"+ className="text-content-emphasis flex h-7 w-fit items-center rounded-lg border border-neutral-200 bg-white px-2.5 text-sm font-medium hover:bg-neutral-100"+ >+ Read more+ </Link>+ </div>++ {/* Inner border, painted over the image */}+ <div className="pointer-events-none absolute inset-0 z-10 rounded-xl border border-white/10" />++ {/* Progress bars */}+ <div className="absolute inset-x-6 bottom-6 flex items-center gap-3">+ {CUSTOMERS.map((c, i) => {+ const isActive = i === index;+ return (+ <button+ key={c.slug}+ type="button"+ aria-label={`Show ${c.name}`}+ aria-current={isActive}+ onClick={() => goTo(i)}+ className="group relative h-1 min-w-0 flex-1 cursor-pointer"+ >+ <div className="h-full w-full rounded-full bg-white/20 transition-colors group-hover:bg-white/30" />+ {isActive && (+ <motion.div+ key={index}+ initial={{ scaleX: 0 }}+ animate={{ scaleX: 1 }}+ transition={{+ duration: AUTO_ADVANCE_MS / 1000,+ ease: "linear",+ }}+ onAnimationComplete={() => goTo(index + 1)}+ className="absolute inset-0 origin-left rounded-full bg-white"+ />+ )}+ </button>+ );+ })}+ </div>+ </div>+ );+}diff --git a/apps/web/app/app.dub.co/(auth-marketing)/customer-logos.tsx b/apps/web/app/app.dub.co/(auth-marketing)/customer-logos.tsxindex 640c5945ec..869754aa1a 100644--- a/apps/web/app/app.dub.co/(auth-marketing)/customer-logos.tsx+++ b/apps/web/app/app.dub.co/(auth-marketing)/customer-logos.tsx@@ -4,32 +4,35 @@ import { cn } from "@dub/utils";const CUSTOMER_LOGOS: { name: string; src: string; className?: string }[] = [{- name: "Framer",- src: "https://assets.dub.co/companies/framer.svg",- className: "h-6",- },- {- name: "Granola",- src: "https://assets.dub.co/companies/granola.svg",+ name: "beehiiv",+ src: "https://assets.dub.co/companies/beehiiv.svg",className: "h-5",},- { name: "Buffer", src: "https://assets.dub.co/companies/buffer.svg" },{- name: "Copper",- src: "https://assets.dub.co/companies/copper.svg",+ name: "Wispr Flow",+ src: "https://assets.dub.co/companies/wisprflow.svg",className: "h-4",},+ { name: "Granola", src: "https://assets.dub.co/companies/granola.svg" },{- name: "Perplexity",- src: "https://assets.dub.co/companies/perplexity.svg",+ name: "Superhuman",+ src: "https://assets.dub.co/companies/superhuman.svg",className: "h-5",},- { name: "Wispr Flow", src: "https://assets.dub.co/companies/flow.svg" },+ {+ name: "Polymarket",+ src: "https://assets.dub.co/companies/polymarket.svg",+ },+ {+ name: "Viktor",+ src: "https://assets.dub.co/companies/viktor.svg",+ className: "h-4",+ },];export function CustomerLogos() {return (- <div className="relative z-10 mx-auto flex max-w-md flex-wrap items-center justify-center gap-x-14 gap-y-8 px-8 pb-12 pt-6 lg:px-10">+ <div className="relative z-10 mx-auto grid max-w-md grid-cols-3 place-items-center gap-x-12 gap-y-8 px-12 pb-12 pt-6 lg:px-8">{CUSTOMER_LOGOS.map((logo, index) => (<imgkey={logo.name}diff --git a/apps/web/app/app.dub.co/(auth-marketing)/side-panel.tsx b/apps/web/app/app.dub.co/(auth-marketing)/side-panel.tsxindex a925367ec5..8ef9fbd0dd 100644--- a/apps/web/app/app.dub.co/(auth-marketing)/side-panel.tsx+++ b/apps/web/app/app.dub.co/(auth-marketing)/side-panel.tsx@@ -1,5 +1,5 @@import { cn } from "@dub/utils";-import Link from "next/link";+import { CustomerCarousel } from "./customer-carousel";import { CustomerLogos } from "./customer-logos";export function SidePanel() {@@ -26,36 +26,9 @@ export function SidePanel() {</div>))}- {/* Testimonial section - vertically centered */}+ {/* Customer carousel - vertically centered */}<div className="relative flex grow items-center justify-center p-8 lg:p-14">- <div className="flex flex-col gap-6">- <div className="relative overflow-hidden rounded-xl border border-neutral-900/10">- <img- src="https://assets.dub.co/cms/framer-thumbnail.jpg"- alt="Framer team"- className="aspect-[16/12] w-full object-cover"- />- <div className="pointer-events-none absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-neutral-900 to-transparent opacity-30" />- <img- src="https://assets.dub.co/companies/framer.svg"- alt="Framer"- className="absolute left-6 top-6 h-8 w-auto brightness-0 invert"- />- </div>-- <p className="text-content-default max-w-[370px] text-pretty text-xl font-medium">- Learn how Framer manages $900K+ in monthly affiliate payouts with- Dub- </p>-- <Link- href="https://dub.co/customers/framer"- target="_blank"- className="text-content-emphasis flex h-8 w-fit items-center rounded-lg bg-black/5 px-3 text-sm font-medium transition-[transform,background-color] duration-75 hover:bg-black/10 active:scale-[0.98]"- >- Read more- </Link>- </div>+ <CustomerCarousel /></div><CustomerLogos />