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.

Remove redundant earnings filter UI guards

Cursor Agent0d067c8d04e0
diff --git a/apps/web/ui/partners/earnings/earnings-composite-chart.tsx b/apps/web/ui/partners/earnings/earnings-composite-chart.tsx
index e7b5fc79b7..6b4f7a6301 100644
--- a/apps/web/ui/partners/earnings/earnings-composite-chart.tsx
+++ b/apps/web/ui/partners/earnings/earnings-composite-chart.tsx
@@ -445,38 +445,25 @@ function EarningsTableControls() {
return <LinkIcon url={props.option?.data?.url} />;
},
options:
- links
- ?.flatMap(({ id, domain, key, url }) =>
- id && domain && key
- ? [
- {
- value: id,
- label: linkConstructor({
- domain,
- key,
- pretty: true,
- }),
- data: { url },
- },
- ]
- : [],
- ) ?? null,
+ links?.map(({ id, domain, key, url }) => ({
+ value: id,
+ label: linkConstructor({
+ domain,
+ key,
+ pretty: true,
+ }),
+ data: { url },
+ })) ?? null,
},
{
key: "customerId",
icon: User,
label: "Customer",
options:
- customers?.flatMap(({ id, email }) =>
- id
- ? [
- {
- value: id,
- label: email || id,
- },
- ]
- : [],
- ) ?? null,
+ customers?.map(({ id, email }) => ({
+ value: id,
+ label: email || id,
+ })) ?? null,
},
{
key: "status",