Skip to content

Commit 6ea44d8

Browse files
committed
Merge branch 'payouts' of https://github.com/dubinc/dub into payouts
2 parents a475c14 + a3f33fc commit 6ea44d8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/overview-chart.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ export function OverviewChart() {
7979
<div className="flex size-full items-center justify-center">
8080
<LoadingSpinner />
8181
</div>
82+
) : error ? (
83+
<div className="flex size-full items-center justify-center text-sm text-neutral-500">
84+
Failed to load data
85+
</div>
8286
) : (
8387
<TimeSeriesChart
8488
key={`${start?.toString}-${end?.toString()}-${interval?.toString()}`}

apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/use-sale-filters.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import useSalesCount from "@/lib/swr/use-sales-count";
22
import useWorkspace from "@/lib/swr/use-workspace";
33
import { EnrolledPartnerProps } from "@/lib/types";
44
import { CircleDotted, useRouterStuff } from "@dub/ui";
5-
import { cn, fetcher, nFormatter } from "@dub/utils";
5+
import { Users } from "@dub/ui/src/icons";
6+
import { cn, DICEBEAR_AVATAR_URL, fetcher, nFormatter } from "@dub/utils";
67
import { useParams } from "next/navigation";
78
import { useMemo } from "react";
89
import useSWR from "swr";
@@ -45,12 +46,19 @@ export function useSaleFilters(extraSearchParams: Record<string, string>) {
4546

4647
{
4748
key: "partnerId",
48-
icon: CircleDotted,
49+
icon: Users,
4950
label: "Partner",
50-
options: (partners || []).map(({ id, name }) => {
51+
options: (partners || []).map(({ id, name, logo }) => {
5152
return {
5253
value: id,
5354
label: name,
55+
icon: (
56+
<img
57+
src={logo || `${DICEBEAR_AVATAR_URL}${name}`}
58+
alt={`${name} avatar`}
59+
className="size-4 rounded-full"
60+
/>
61+
),
5462
};
5563
}),
5664
},

0 commit comments

Comments
 (0)