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 filter to CustomerRowItem

Steven Tey0fc4a48f5a53
diff --git a/apps/web/ui/analytics/events/customer-row-item.tsx b/apps/web/ui/analytics/events/customer-row-item.tsx
index f5ed182be1..16f8223ac6 100644
--- a/apps/web/ui/analytics/events/customer-row-item.tsx
+++ b/apps/web/ui/analytics/events/customer-row-item.tsx
@@ -12,8 +12,7 @@ export function CustomerRowItem({ customer }: { customer: Customer }) {
<>
<Link
href={`/${slug}/customers/${customer.id}`}
- scroll={false}
- className="flex w-full items-center justify-between gap-2 px-4 py-2.5 transition-colors hover:bg-stone-100"
+ className="group flex cursor-alias items-center justify-between gap-2 px-4 py-2.5 decoration-dotted hover:underline"
>
<div className="flex items-center gap-3 truncate" title={display}>
<img
@@ -23,7 +22,7 @@ export function CustomerRowItem({ customer }: { customer: Customer }) {
/>
<span className="truncate">{display}</span>
</div>
- <ChartActivity2 className="size-3.5 shrink-0" />
+ <ChartActivity2 className="size-3.5 shrink-0 transition-all group-hover:-translate-x-3 group-hover:opacity-0" />
</Link>
</>
);
diff --git a/apps/web/ui/analytics/events/events-table.tsx b/apps/web/ui/analytics/events/events-table.tsx
index 6602ba6716..efafa15cc1 100644
--- a/apps/web/ui/analytics/events/events-table.tsx
+++ b/apps/web/ui/analytics/events/events-table.tsx
@@ -156,6 +156,11 @@ export default function EventsTable({
size: 250,
maxSize: 400,
cell: ({ getValue }) => <CustomerRowItem customer={getValue()} />,
+ meta: {
+ filterParams: ({ getValue }) => ({
+ customerId: getValue().id,
+ }),
+ },
},
{
id: "country",