The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix inline widget
Steven Teyd2154e2a7554
diff --git a/apps/web/app/app.dub.co/embed/inline/page-client.tsx b/apps/web/app/app.dub.co/embed/inline/page-client.tsxindex 5465d1974f..81b9f1446d 100644--- a/apps/web/app/app.dub.co/embed/inline/page-client.tsx+++ b/apps/web/app/app.dub.co/embed/inline/page-client.tsx@@ -19,7 +19,6 @@ import useSWR from "swr";import { Activity } from "../activity";import { SalesList } from "../sales-list";import { LinkToken } from "../token";-import { useIframeVisibility } from "../use-iframe-visibility";export function EmbedInlinePageClient({program,@@ -34,10 +33,8 @@ export function EmbedInlinePageClient({}) {const [copied, copyToClipboard] = useCopyToClipboard();- const isIframeVisible = useIframeVisibility();-const { data: sales, isLoading } = useSWR<PartnerSaleResponse[]>(- isIframeVisible && "/api/embed/sales",+ "/api/embed/sales",fetcher,{keepPreviousData: true,@@ -52,12 +49,9 @@ export function EmbedInlinePageClient({}><div className="p-5">- <div className="relative flex flex-col rounded-lg border border-neutral-300 bg-gradient-to-r from-neutral-50 p-4 md:p-6">+ <div className="relative flex flex-col overflow-hidden rounded-lg border border-neutral-300 bg-gradient-to-r from-neutral-50 p-4 md:p-6">{program && (- <HeroBackground- logo={program?.logo}- color={program?.brandColor || "#647481"}- />+ <HeroBackground logo={program?.logo} color={program?.brandColor} />)}<span className="flex items-center gap-2 text-sm text-neutral-500"><MoneyBill2 className="size-4" />@@ -74,7 +68,7 @@ export function EmbedInlinePageClient({type="text"readOnlyvalue={getPrettyUrl(link.shortLink)}- className="xs:w-auto h-10 w-full rounded-md border border-neutral-300 px-3 text-sm focus:border-gray-500 focus:outline-none focus:ring-gray-500 lg:min-w-64 xl:min-w-72"+ className="xs:w-auto h-10 w-full rounded-md border border-neutral-300 px-3 text-sm focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 lg:min-w-64 xl:min-w-72"/><Buttonicon={@@ -102,6 +96,14 @@ export function EmbedInlinePageClient({onClick={() => copyToClipboard(link.shortLink)}/></div>+ <a+ href="https://d.to/conversions"+ target="_blank"+ className="mt-2 flex items-center justify-center gap-2 rounded-lg border-neutral-100 bg-white px-4 py-1.5 transition-colors hover:border-neutral-200 active:bg-neutral-50 md:absolute md:bottom-3 md:right-3 md:mt-0 md:translate-x-0 md:border md:drop-shadow-sm"+ >+ <p className="text-sm text-neutral-600">Powered by</p>+ <Wordmark className="h-4" />+ </a></div><div className="mt-5"><>@@ -148,19 +150,7 @@ export function EmbedInlinePageClient({))}</div></>- {isIframeVisible && <LinkToken />}- </div>- </div>- <div className="flex grow flex-col justify-end">- <div className="flex items-center justify-center">- <a- href="https://d.to/conversions"- target="_blank"- className="flex items-center justify-center gap-1 rounded-lg bg-white p-2 pb-2.5 transition-colors"- >- <p className="text-sm text-neutral-500">Powered by</p>- <Wordmark className="h-4" />- </a>+ <LinkToken /></div></div></div>diff --git a/packages/embeds/core/src/core.ts b/packages/embeds/core/src/core.tsindex 0c82cd3fcf..3f7aebdc90 100644--- a/packages/embeds/core/src/core.ts+++ b/packages/embeds/core/src/core.ts@@ -14,7 +14,7 @@ import { DubInitResult, DubOptions, IframeMessage } from "./types";const INLINE_CONTAINER_STYLES = {position: "relative",maxWidth: "1024px",- height: "730px",+ height: "760px",margin: "0 auto",};