The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
remove accentColor
Steven Teyed1d209a6e10
diff --git a/apps/web/app/app.dub.co/embed/widget/page-client.tsx b/apps/web/app/app.dub.co/embed/widget/page-client.tsxindex 4de9d1752c..4388b8b80f 100644--- a/apps/web/app/app.dub.co/embed/widget/page-client.tsx+++ b/apps/web/app/app.dub.co/embed/widget/page-client.tsx@@ -36,12 +36,10 @@ export function EmbedWidgetPageClient({program,link,earnings,- accentColor,}: {program: Program;link: Link;earnings: number;- accentColor: string;}) {const [copied, copyToClipboard] = useCopyToClipboard();const [selectedTab, setSelectedTab] = useState<Tab>("invite");@@ -54,7 +52,9 @@ export function EmbedWidgetPageClient({return (<divclassName="flex min-h-screen flex-col"- style={{ "--accent-color": accentColor } as CSSProperties}+ style={+ { "--accent-color": program.brandColor || "#000000" } as CSSProperties+ }><divclassName={cn(diff --git a/apps/web/app/app.dub.co/embed/widget/page.tsx b/apps/web/app/app.dub.co/embed/widget/page.tsxindex 4294261c94..dae7b859d7 100644--- a/apps/web/app/app.dub.co/embed/widget/page.tsx+++ b/apps/web/app/app.dub.co/embed/widget/page.tsx@@ -4,18 +4,13 @@ import { EmbedWidgetPageClient } from "./page-client";export default async function EmbedWidgetPage({searchParams,}: {- searchParams: { token: string; accentColor?: string };+ searchParams: { token: string };}) {- const { token, accentColor } = searchParams;+ const { token } = searchParams;const { link, program, earnings } = await getLinkAndProgram(token);return (- <EmbedWidgetPageClient- program={program}- link={link}- earnings={earnings}- accentColor={accentColor ?? "#000"}- />+ <EmbedWidgetPageClient program={program} link={link} earnings={earnings} />);}diff --git a/packages/embeds/core/src/core.ts b/packages/embeds/core/src/core.tsindex 7798c52b65..0fd28f06fe 100644--- a/packages/embeds/core/src/core.ts+++ b/packages/embeds/core/src/core.ts@@ -95,14 +95,10 @@ const CLOSE_BUTTON_STYLES = {color: "white",};-const createIframe = (- iframeUrl: string,- token: string,- accentColor?: string,-): HTMLIFrameElement => {+const createIframe = (iframeUrl: string, token: string): HTMLIFrameElement => {const iframe = document.createElement("iframe");- iframe.src = `${iframeUrl}?token=${token}&accentColor=${encodeURIComponent(accentColor ?? "#000")}`;+ iframe.src = `${iframeUrl}?token=${token}`;iframe.style.width = "100%";iframe.style.height = "100%";iframe.style.border = "none";@@ -124,7 +120,6 @@ const renderWidget = (const {token,placement,- accentColor,containerStyles,popupStyles,anchorId,@@ -169,7 +164,7 @@ const renderWidget = (display: "none",});- const iframe = createIframe(WIDGET_URL, token, accentColor);+ const iframe = createIframe(WIDGET_URL, token);// Close buttonconst closeButton = document.createElement("button");diff --git a/packages/embeds/core/src/types.ts b/packages/embeds/core/src/types.tsindex 4f9d471e1f..ffe904f3ff 100644--- a/packages/embeds/core/src/types.ts+++ b/packages/embeds/core/src/types.ts@@ -35,9 +35,6 @@ export type DubOptions = {// The ID of the anchor elementanchorId?: string;- // Custom accent color- accentColor?: string;-// The styles for the widget containercontainerStyles?: Partial<CSSStyleDeclaration>;popupStyles?: Partial<CSSStyleDeclaration>;