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.

embed/earnings

Steven Tey2b76283ed5d4
diff --git a/apps/web/app/app.dub.co/embed/inline/sales.tsx b/apps/web/app/app.dub.co/embed/inline/earnings.tsx
similarity index 91%
rename from apps/web/app/app.dub.co/embed/inline/sales.tsx
rename to apps/web/app/app.dub.co/embed/inline/earnings.tsx
index bbd2e143ba..9eccb9f81d 100644
--- a/apps/web/app/app.dub.co/embed/inline/sales.tsx
+++ b/apps/web/app/app.dub.co/embed/inline/earnings.tsx
@@ -42,15 +42,13 @@ export function EmbedEarnings({ salesCount }: { salesCount: number }) {
),
},
{
- id: "saleAmount",
+ id: "amount",
header: "Amount",
cell: ({ row }) => {
- row.original.amount
- ? currencyFormatter(row.original.amount / 100, {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- })
- : "-";
+ return currencyFormatter(row.original.amount / 100, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ });
},
},
{
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.tsx
index 878378786f..5b5e33901f 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
@@ -17,12 +17,12 @@ import { AnimatePresence } from "framer-motion";
import { CSSProperties, useState } from "react";
import { LinkToken } from "../token";
import { EmbedActivity } from "./activity";
+import { EmbedEarnings } from "./earnings";
import { EmbedFAQ } from "./faq";
import { HeroBackground } from "./hero-background";
import { EmbedLeaderboard } from "./leaderboard";
import { EmbedPayouts } from "./payouts";
import { EmbedQuickstart } from "./quickstart";
-import { EmbedEarnings } from "./sales";
export function EmbedInlinePageClient({
program,
@@ -46,7 +46,7 @@ export function EmbedInlinePageClient({
}) {
const [copied, copyToClipboard] = useCopyToClipboard();
- const tabs = ["Quickstart", "Sales", "Leaderboard", "FAQ"];
+ const tabs = ["Quickstart", "Earnings", "Leaderboard", "FAQ"];
const [selectedTab, setSelectedTab] = useState(tabs[0]);
return (
@@ -140,7 +140,7 @@ export function EmbedInlinePageClient({
<AnimatePresence mode="wait">
{selectedTab === "Quickstart" ? (
<EmbedQuickstart program={program} link={links[0]} />
- ) : selectedTab === "Sales" ? (
+ ) : selectedTab === "Earnings" ? (
<EmbedEarnings salesCount={stats.sales} />
) : selectedTab === "Leaderboard" ? (
<EmbedLeaderboard />