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 customer-activity-list.tsx

Steven Tey8f699f4c1af2
diff --git a/apps/web/ui/customers/customer-activity-list.tsx b/apps/web/ui/customers/customer-activity-list.tsx
index 9cfce9ab3a..2ebb94812d 100644
--- a/apps/web/ui/customers/customer-activity-list.tsx
+++ b/apps/web/ui/customers/customer-activity-list.tsx
@@ -2,11 +2,14 @@ import { CustomerActivityResponse } from "@/lib/types";
import { LinkLogo } from "@dub/ui";
import { CursorRays, MoneyBill2, UserCheck } from "@dub/ui/icons";
import { getApexDomain, getPrettyUrl } from "@dub/utils";
+import Link from "next/link";
+import { useParams } from "next/navigation";
const activityData = {
click: {
icon: CursorRays,
content: (event) => {
+ const { slug } = useParams();
const referer =
!event.click?.referer || event.click.referer === "(direct)"
? "direct"
@@ -14,7 +17,10 @@ const activityData = {
return (
<span className="flex items-center gap-1.5 [&>*]:min-w-0 [&>*]:truncate">
Found{" "}
- <span className="flex items-center gap-2 rounded-md bg-neutral-100 px-1.5 py-1 font-mono text-xs leading-none">
+ <Link
+ href={`/${slug}/links/${getPrettyUrl(event.link.shortLink)}`}
+ className="flex items-center gap-2 rounded-md bg-neutral-100 px-1.5 py-1 font-mono text-xs leading-none"
+ >
<LinkLogo
className="size-3 shrink-0 sm:size-3"
apexDomain={getApexDomain(event.click.url)}
@@ -22,7 +28,7 @@ const activityData = {
<span className="min-w-0 truncate">
{getPrettyUrl(event.link.shortLink)}
</span>
- </span>
+ </Link>
via
<span className="flex items-center gap-2 rounded-md bg-neutral-100 px-1.5 py-1 font-mono text-xs leading-none">
<LinkLogo