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.

small fixes

Steven Tey91e06db26b1c
diff --git a/apps/web/lib/zod/schemas/customers.ts b/apps/web/lib/zod/schemas/customers.ts
index 139f2f9be1..a0b4ac02d0 100644
--- a/apps/web/lib/zod/schemas/customers.ts
+++ b/apps/web/lib/zod/schemas/customers.ts
@@ -124,5 +124,5 @@ export const customerActivityResponseSchema = z.object({
domain: true,
key: true,
shortLink: true,
- }),
+ }).nullish(),
});
diff --git a/apps/web/scripts/backfill-customers.ts b/apps/web/scripts/backfill-customers.ts
index 5bec8e6b0a..0fd197463f 100644
--- a/apps/web/scripts/backfill-customers.ts
+++ b/apps/web/scripts/backfill-customers.ts
@@ -30,7 +30,7 @@ async function main() {
id: true,
createdAt: true,
},
- take: 100,
+ take: 200,
orderBy: {
createdAt: "desc",
},
@@ -99,14 +99,15 @@ async function main() {
}),
);
- // const remaining = await prisma.customer.count({
- // where: {
- // linkId: null,
- // },
- // });
+ const remaining = await prisma.customer.count({
+ where: {
+ linkId: null,
+ projectId: "cl7pj5kq4006835rbjlt2ofka",
+ },
+ });
console.table(result);
- // console.log(`${remaining} remaining`);
+ console.log(`${remaining} remaining`);
}
main();
diff --git a/apps/web/ui/partners/customer-details-sheet.tsx b/apps/web/ui/partners/customer-details-sheet.tsx
index f53c49bf40..1bfc0dfd0b 100644
--- a/apps/web/ui/partners/customer-details-sheet.tsx
+++ b/apps/web/ui/partners/customer-details-sheet.tsx
@@ -199,21 +199,15 @@ function CustomerDetailsSheetContent({
: "-",
description: !customerActivity?.ltv
? "This customer hasn't made any purchases yet."
- : "",
+ : "The total amount of money this customer has spent on your products.",
},
].map(({ label, value, description }) => (
<div key={label} className="flex flex-col bg-neutral-50 p-3">
- {customerActivity?.ltv ? (
- <span className="truncate text-xs text-neutral-400">
+ <Tooltip content={description} align="end">
+ <span className="cursor-default truncate text-xs text-neutral-400 underline decoration-dotted underline-offset-2">
{label}
</span>
- ) : (
- <Tooltip content={description}>
- <span className="cursor-default truncate text-xs text-neutral-400 underline decoration-dotted underline-offset-2">
- {label}
- </span>
- </Tooltip>
- )}
+ </Tooltip>
<span className="text-base text-neutral-900">{value}</span>
</div>
))}