The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix TS issues
Steven Teyb3e84fcc5aa0
diff --git a/apps/web/app/admin.dub.co/(dashboard)/commissions/client.tsx b/apps/web/app/admin.dub.co/(dashboard)/commissions/client.tsxindex bb12ed88d6..6409c27b2d 100644--- a/apps/web/app/admin.dub.co/(dashboard)/commissions/client.tsx+++ b/apps/web/app/admin.dub.co/(dashboard)/commissions/client.tsx@@ -85,11 +85,13 @@ export default function CommissionsPageClient() {const totals = useMemo(() => {return {- commissions: timeseries?.reduce(- (acc, { commissions }) => acc + commissions,- 0,- ),- revenue: timeseries?.reduce((acc, { revenue }) => acc + revenue, 0),+ commissions:+ timeseries?.reduce(+ (acc, { commissions }) => acc + (commissions || 0),+ 0,+ ) ?? 0,+ revenue:+ timeseries?.reduce((acc, { revenue }) => acc + (revenue || 0), 0) ?? 0,};}, [timeseries]);@@ -202,11 +204,9 @@ export default function CommissionsPageClient() {<span>{label}</span></div><div className="mt-1 flex h-12 items-center">- {totals[id] === undefined ? (- <div className="h-10 w-24 animate-pulse rounded-md bg-neutral-200" />- ) : (+ {(totals[id] || totals[id] === 0) && !isLoading ? (<NumberFlow- value={totals[id] / 100}+ value={(totals[id] ?? 0) / 100}className="text-xl font-medium sm:text-3xl"format={{style: "currency",@@ -215,6 +215,8 @@ export default function CommissionsPageClient() {trailingZeroDisplay: "stripIfInteger",}}/>+ ) : (+ <div className="h-10 w-24 animate-pulse rounded-md bg-neutral-200" />)}</div></button>diff --git a/apps/web/app/admin.dub.co/(dashboard)/payouts/client.tsx b/apps/web/app/admin.dub.co/(dashboard)/payouts/client.tsxindex c44523f2a2..108912db3c 100644--- a/apps/web/app/admin.dub.co/(dashboard)/payouts/client.tsx+++ b/apps/web/app/admin.dub.co/(dashboard)/payouts/client.tsx@@ -99,9 +99,10 @@ export default function PayoutsPageClient() {const totals = useMemo(() => {return {- payouts: timeseriesData?.reduce((acc, { payouts }) => acc + payouts, 0),- fees: timeseriesData?.reduce((acc, { fees }) => acc + fees, 0),- total: timeseriesData?.reduce((acc, { total }) => acc + total, 0),+ payouts:+ timeseriesData?.reduce((acc, { payouts }) => acc + payouts, 0) ?? 0,+ fees: timeseriesData?.reduce((acc, { fees }) => acc + fees, 0) ?? 0,+ total: timeseriesData?.reduce((acc, { total }) => acc + total, 0) ?? 0,};}, [timeseriesData]);@@ -225,11 +226,9 @@ export default function PayoutsPageClient() {<span>{label}</span></div><div className="mt-1 flex h-12 items-center">- {totals[id] === undefined ? (- <div className="h-10 w-24 animate-pulse rounded-md bg-neutral-200" />- ) : (+ {(totals[id] || totals[id] === 0) && !isLoading ? (<NumberFlow- value={totals[id] / 100}+ value={(totals[id] ?? 0) / 100}className="text-xl font-medium sm:text-3xl"format={{style: "currency",@@ -238,6 +237,8 @@ export default function PayoutsPageClient() {trailingZeroDisplay: "stripIfInteger",}}/>+ ) : (+ <div className="h-10 w-24 animate-pulse rounded-md bg-neutral-200" />)}</div></button>