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.

Update toggle.tsx

Steven Teyf83f33f49d75
diff --git a/apps/web/ui/analytics/toggle.tsx b/apps/web/ui/analytics/toggle.tsx
index d0308680d5..19b283a107 100644
--- a/apps/web/ui/analytics/toggle.tsx
+++ b/apps/web/ui/analytics/toggle.tsx
@@ -414,20 +414,21 @@ export default function Toggle({
? `/${slug}/customers/${selectedCustomerId}`
: undefined;
},
- options:
- customers?.map(({ id, email, name, avatar }) => {
- return {
- value: id,
- label: email ?? name,
- icon: (
- <img
- src={avatar || `${OG_AVATAR_URL}${id}`}
- alt={`${email} avatar`}
- className="size-4 rounded-full"
- />
- ),
- };
- }) ?? null,
+ options: customers?.map(({ id, email, name, avatar }) => {
+ return {
+ value: id,
+ label: email ?? name,
+ icon: (
+ <img
+ src={avatar || `${OG_AVATAR_URL}${id}`}
+ alt={`${email} avatar`}
+ className="size-4 rounded-full"
+ />
+ ),
+ };
+ }) ?? [
+ { value: selectedCustomerId, label: selectedCustomerId, icon: User },
+ ],
};
const filters: ComponentProps<typeof Filter.Select>["filters"] = useMemo(