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 new filter UI

Kiran K0148ce2d5e57
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-stats.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-stats.tsx
index 1653027940..38bc2f47ac 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-stats.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-stats.tsx
@@ -10,7 +10,6 @@ import { useParams } from "next/navigation";
export function SaleStats() {
const { slug, programId } = useParams();
const { queryParams } = useRouterStuff();
-
const { salesCount, error } = useSalesCount();
return (
diff --git a/apps/web/ui/partners/program-stats-filter.tsx b/apps/web/ui/partners/program-stats-filter.tsx
index 2b06633e86..27df13e4e3 100644
--- a/apps/web/ui/partners/program-stats-filter.tsx
+++ b/apps/web/ui/partners/program-stats-filter.tsx
@@ -1,6 +1,5 @@
import { Icon } from "@dub/ui";
-import { cn, currencyFormatter } from "@dub/utils";
-import { nFormatter } from "@dub/utils/src/functions";
+import { cn, currencyFormatter, nFormatter } from "@dub/utils";
import Link from "next/link";
export function ProgramStatsFilter({
@@ -25,40 +24,47 @@ export function ProgramStatsFilter({
return (
<Link
href={href}
- className="flex items-center gap-4 p-3 text-left transition-colors duration-75 hover:bg-neutral-50 active:bg-neutral-100"
+ className="flex flex-col gap-3 p-3 transition-colors duration-75 hover:bg-neutral-50 active:bg-neutral-100"
>
- <div
- className={cn(
- "flex size-10 items-center justify-center rounded-md",
- iconClassName,
- )}
- >
- <Icon className="size-4.5" />
+ <div className="flex items-center gap-2">
+ <div
+ className={cn(
+ "flex size-6 items-center justify-center gap-2 rounded-md",
+ iconClassName,
+ )}
+ >
+ <Icon className="size-4" />
+ </div>
+ <div className="text-xs text-neutral-500">{label}</div>
</div>
+
<div>
- <div className="text-xs text-neutral-500">{label}</div>
{count !== undefined || error ? (
- <div className="flex items-end gap-1 text-base font-medium leading-tight text-neutral-800">
+ <div className="flex flex-col bg-red-50">
{error ? (
"-"
) : (
<>
- {nFormatter(count, { full: true })}
+ <span className="text-base font-semibold leading-tight text-neutral-600">
+ {nFormatter(count, { full: true })}
+ </span>
+
{amount !== undefined && (
<span className="text-xs text-neutral-500">
- ({currencyFormatter(amount / 100)})
+ {currencyFormatter(amount / 100)}
</span>
)}
+
{earnings !== undefined && (
<span className="text-xs text-neutral-500">
- ({currencyFormatter(earnings / 100)})
+ {currencyFormatter(earnings / 100)}
</span>
)}
</>
)}
</div>
) : (
- <div className="h-5 w-10 min-w-0 animate-pulse rounded-md bg-neutral-200" />
+ <div className="h-14 w-full animate-pulse rounded-md bg-neutral-200" />
)}
</div>
</Link>