The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
move Links above Colors
Steven Teyb514affdcf92
diff --git a/apps/web/app/(ee)/app.dub.co/embed/referrals/resources.tsx b/apps/web/app/(ee)/app.dub.co/embed/referrals/resources.tsxindex b808d495c9..877143546f 100644--- a/apps/web/app/(ee)/app.dub.co/embed/referrals/resources.tsx+++ b/apps/web/app/(ee)/app.dub.co/embed/referrals/resources.tsx@@ -38,25 +38,6 @@ export function ReferralsEmbedResources({))}</ResourceSection>)}- {!!resources?.colors?.length && (- <ResourceSection resource="color" title="Colors">- {resources?.colors?.map((color) => (- <ResourceCard- key={color.id}- resourceType="color"- icon={- <div- className="size-full"- style={{ backgroundColor: color.color }}- />- }- title={color.name || "Color"}- description={color.color.toUpperCase()}- copyText={color.color.toUpperCase()}- />- ))}- </ResourceSection>- )}{!!resources?.links?.length && (<ResourceSection resource="link" title="Links">@@ -81,6 +62,26 @@ export function ReferralsEmbedResources({</ResourceSection>)}+ {!!resources?.colors?.length && (+ <ResourceSection resource="color" title="Colors">+ {resources?.colors?.map((color) => (+ <ResourceCard+ key={color.id}+ resourceType="color"+ icon={+ <div+ className="size-full"+ style={{ backgroundColor: color.color }}+ />+ }+ title={color.name || "Color"}+ description={color.color.toUpperCase()}+ copyText={color.color.toUpperCase()}+ />+ ))}+ </ResourceSection>+ )}+{!!resources?.files?.length && (<ResourceSection resource="file" title="Additional files">{resources?.files?.map((file) => (diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/resources/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/resources/page-client.tsxindex e52801725b..0c584e4c1d 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/resources/page-client.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/resources/page-client.tsx@@ -56,31 +56,6 @@ export function ResourcesPageClient() {</ResourceSection>)}- {(isLoading || !!resources?.colors?.length) && (- <ResourceSection- resource="color"- title="Colors"- isLoading={isLoading}- isValidating={isValidating}- >- {resources?.colors?.map((color) => (- <ResourceCard- key={color.id}- resourceType="color"- icon={- <div- className="size-full"- style={{ backgroundColor: color.color }}- />- }- title={color.name || "Color"}- description={color.color.toUpperCase()}- copyText={color.color.toUpperCase()}- />- ))}- </ResourceSection>- )}-{(isLoading || !!resources?.links?.length) && (<ResourceSectionresource="link"@@ -109,6 +84,31 @@ export function ResourcesPageClient() {</ResourceSection>)}+ {(isLoading || !!resources?.colors?.length) && (+ <ResourceSection+ resource="color"+ title="Colors"+ isLoading={isLoading}+ isValidating={isValidating}+ >+ {resources?.colors?.map((color) => (+ <ResourceCard+ key={color.id}+ resourceType="color"+ icon={+ <div+ className="size-full"+ style={{ backgroundColor: color.color }}+ />+ }+ title={color.name || "Color"}+ description={color.color.toUpperCase()}+ copyText={color.color.toUpperCase()}+ />+ ))}+ </ResourceSection>+ )}+{(isLoading || !!resources?.files?.length) && (<ResourceSectionresource="file"diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/resources/program-brand-assets/index.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/resources/program-brand-assets/index.tsxindex cd271212ac..c50f4cf87b 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/resources/program-brand-assets/index.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/resources/program-brand-assets/index.tsx@@ -118,15 +118,15 @@ export function ProgramBrandAssets() {</SettingsRow><SettingsRow- heading="Colors"- description="Provide affiliates with official colors"+ heading="Links"+ description="Provide any additional links helpful to your partners"><div className="flex flex-col gap-3"><div className="flex items-center justify-end"><Button- text="Add Color"+ text="Add Link"className="h-8 w-fit px-3"- onClick={() => setShowAddColorModal(true)}+ onClick={() => setShowAddLinkModal(true)}loading={isLoading}/></div>@@ -134,22 +134,26 @@ export function ProgramBrandAssets() {heighttransition={{ duration: 0.2, ease: "easeInOut" }}>- {resources?.colors && resources.colors.length > 0 && (+ {resources?.links && resources.links.length > 0 && (<div className="grid gap-2">- {resources?.colors?.map((color) => (+ {resources?.links?.map((link) => (<ResourceCard- key={color.id}- resourceType="color"+ key={link.id}+ resourceType="link"icon={- <div- className="size-full"- style={{ backgroundColor: color.color }}- />+ <div className="flex size-full items-center justify-center bg-neutral-50">+ <img+ src={`${GOOGLE_FAVICON_URL}${getApexDomain(link.url)}`}+ alt={link.name}+ className="size-6 rounded-full object-contain"+ />+ </div>}- title={color.name || "Color"}- description={color.color.toUpperCase()}- copyText={color.color.toUpperCase()}- onDelete={() => handleDelete("color", color.id)}+ title={link.name}+ description={getPrettyUrl(link.url)}+ visitUrl={link.url}+ copyText={link.url}+ onDelete={() => handleDelete("link", link.id)}/>))}</div>@@ -159,15 +163,15 @@ export function ProgramBrandAssets() {</SettingsRow><SettingsRow- heading="Links"- description="Provide any additional links helpful to your partners"+ heading="Colors"+ description="Provide affiliates with official colors"><div className="flex flex-col gap-3"><div className="flex items-center justify-end"><Button- text="Add Link"+ text="Add Color"className="h-8 w-fit px-3"- onClick={() => setShowAddLinkModal(true)}+ onClick={() => setShowAddColorModal(true)}loading={isLoading}/></div>@@ -175,26 +179,22 @@ export function ProgramBrandAssets() {heighttransition={{ duration: 0.2, ease: "easeInOut" }}>- {resources?.links && resources.links.length > 0 && (+ {resources?.colors && resources.colors.length > 0 && (<div className="grid gap-2">- {resources?.links?.map((link) => (+ {resources?.colors?.map((color) => (<ResourceCard- key={link.id}- resourceType="link"+ key={color.id}+ resourceType="color"icon={- <div className="flex size-full items-center justify-center bg-neutral-50">- <img- src={`${GOOGLE_FAVICON_URL}${getApexDomain(link.url)}`}- alt={link.name}- className="size-6 rounded-full object-contain"- />- </div>+ <div+ className="size-full"+ style={{ backgroundColor: color.color }}+ />}- title={link.name}- description={getPrettyUrl(link.url)}- visitUrl={link.url}- copyText={link.url}- onDelete={() => handleDelete("link", link.id)}+ title={color.name || "Color"}+ description={color.color.toUpperCase()}+ copyText={color.color.toUpperCase()}+ onDelete={() => handleDelete("color", color.id)}/>))}</div>