Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Add a "powered by Dub" badge

Kiran Kefba8e12d817
diff --git a/apps/web/app/app.dub.co/embed/page-client.tsx b/apps/web/app/app.dub.co/embed/page-client.tsx
index 8fc8f179f1..86f63b8dcb 100644
--- a/apps/web/app/app.dub.co/embed/page-client.tsx
+++ b/apps/web/app/app.dub.co/embed/page-client.tsx
@@ -8,7 +8,13 @@ import {
import { HeroBackground } from "@/ui/partners/hero-background";
import { ProgramCommissionDescription } from "@/ui/partners/program-commission-description";
import { StatCard } from "@/ui/partners/stat-card";
-import { Button, Check2, useCopyToClipboard, useRouterStuff } from "@dub/ui";
+import {
+ Button,
+ Check2,
+ useCopyToClipboard,
+ useRouterStuff,
+ Wordmark,
+} from "@dub/ui";
import { Copy, MoneyBill2 } from "@dub/ui/src/icons";
import { getPrettyUrl } from "@dub/utils";
import { useContext } from "react";
@@ -39,10 +45,12 @@ export function ReferralsEmbedPageClient() {
<>
<div className="relative flex flex-col rounded-lg border border-neutral-300 bg-gradient-to-r from-neutral-50 p-4 md:p-6">
{program && <HeroBackground logo={program?.logo} color={color} />}
+
<span className="flex items-center gap-2 text-sm text-neutral-500">
<MoneyBill2 className="size-4" />
Refer and earn
</span>
+
<div className="relative mt-24 text-lg text-neutral-900 sm:max-w-[50%]">
{program ? (
<ProgramCommissionDescription program={program} />
@@ -50,9 +58,11 @@ export function ReferralsEmbedPageClient() {
<div className="mb-7 h-7 w-full animate-pulse rounded-md bg-neutral-200" />
)}
</div>
+
<span className="mb-1.5 mt-6 block text-sm text-neutral-800">
Referral link
</span>
+
<div className="xs:flex-row relative flex flex-col items-center gap-2">
{!isLoadingLink && link ? (
<input
@@ -78,35 +88,51 @@ export function ReferralsEmbedPageClient() {
/>
</div>
</div>
- <ProgramOverviewContext.Provider
- value={{
- start: start ? new Date(start) : undefined,
- end: end ? new Date(end) : undefined,
- interval,
- color,
- }}
- >
- <div className="mt-6 rounded-lg border border-neutral-300">
- <div className="p-4 md:p-6 md:pb-4">
- <EarningsChartContainer />
+
+ <div>
+ <ProgramOverviewContext.Provider
+ value={{
+ start: start ? new Date(start) : undefined,
+ end: end ? new Date(end) : undefined,
+ interval,
+ color,
+ }}
+ >
+ <div className="mt-6 rounded-lg border border-neutral-300">
+ <div className="p-4 md:p-6 md:pb-4">
+ <EarningsChartContainer />
+ </div>
</div>
- </div>
- <div className="mt-6 grid grid-cols-[minmax(0,1fr)] gap-4 sm:grid-cols-3">
- <StatCardContainer title="Clicks" event="clicks" />
- <StatCardContainer title="Leads" event="leads" />
- <StatCardContainer title="Sales" event="sales" />
- </div>
- <div className="mt-6">
- <div className="flex items-center justify-between">
- <h2 className="text-base font-medium text-neutral-900">
- Recent sales
- </h2>
+ <div className="mt-6 grid grid-cols-[minmax(0,1fr)] gap-4 sm:grid-cols-3">
+ <StatCardContainer title="Clicks" event="clicks" />
+ <StatCardContainer title="Leads" event="leads" />
+ <StatCardContainer title="Sales" event="sales" />
</div>
- <div className="mt-4">
- <SaleTable limit={10} />
+ <div className="mt-6">
+ <div className="flex items-center justify-between">
+ <h2 className="text-base font-medium text-neutral-900">
+ Recent sales
+ </h2>
+ </div>
+ <div className="mt-4">
+ <SaleTable limit={10} />
+ </div>
</div>
- </div>
- </ProgramOverviewContext.Provider>
+ </ProgramOverviewContext.Provider>
+ </div>
+
+ <div className="flex items-center justify-center">
+ <a
+ href="https://d.to/conversions"
+ target="_blank"
+ className="mt-2 flex items-center justify-center gap-2 rounded-lg bg-white p-2 transition-colors md:translate-x-0"
+ >
+ <Wordmark className="h-4" />
+ <p className="text-xs text-gray-800">
+ Powered by <span className="font-medium">Dub Conversions</span>
+ </p>
+ </a>
+ </div>
</>
);
}