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 page-client.tsx

Tim Wilsondc637faf36bd
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
index 5786660a94..d777bc8148 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
@@ -2,8 +2,9 @@
import useCustomer from "@/lib/swr/use-customer";
import useWorkspace from "@/lib/swr/use-workspace";
-import { CopyButton, Tooltip } from "@dub/ui";
-import { COUNTRIES, DICEBEAR_AVATAR_URL } from "@dub/utils";
+import { BackLink } from "@/ui/shared/back-link";
+import { CopyButton } from "@dub/ui";
+import { DICEBEAR_AVATAR_URL } from "@dub/utils";
import { notFound, useParams } from "next/navigation";
export function CustomerPageClient() {
@@ -18,50 +19,33 @@ export function CustomerPageClient() {
if (!customer) notFound();
return (
- <div className="mt-4 flex items-center gap-4">
- <div className="relative w-fit">
+ <div className="mt-2">
+ <BackLink href={`/${slug}/links`}>Dashboard</BackLink>
+ <div className="mt-5 flex items-center gap-4">
<img
src={customer.avatar || `${DICEBEAR_AVATAR_URL}${customer.name}`}
alt={customer.name}
className="size-12 rounded-full"
/>
- {customer.country && (
- <Tooltip content={COUNTRIES[customer.country]}>
- <div className="absolute -right-1 top-0 overflow-hidden rounded-full bg-neutral-50 p-0.5 transition-transform duration-100 hover:scale-[1.15]">
- <img
- alt=""
- src={`https://flag.vercel.app/m/${customer.country}.svg`}
- className="size-3 rounded-full"
- />
- </div>
- </Tooltip>
- )}
- </div>
- <div className="flex flex-col gap-1">
- <div className="flex items-center gap-2">
- <h1 className="text-lg font-semibold leading-tight text-neutral-900">
+ <div className="flex flex-col gap-1">
+ <h1 className="text-base font-semibold leading-tight text-neutral-900">
{customer.name}
</h1>
- <span className="rounded-full border border-neutral-200 bg-neutral-200 px-1.5 py-0.5 text-xs text-neutral-900">
- {new Date(customer.createdAt).toLocaleDateString("en-US", {
- month: "short",
- day: "numeric",
- year: "numeric",
- })}
- </span>
- </div>
- {customer.email && (
- <div className="flex items-center gap-1">
- <span className="text-sm text-neutral-500">{customer.email}</span>
- <CopyButton
- value={customer.email}
- variant="neutral"
- className="p-1 [&>*]:h-3 [&>*]:w-3"
- successMessage="Copied email to clipboard!"
- />
- </div>
- )}
+ {customer.email && (
+ <div className="flex items-center gap-1">
+ <span className="text-sm font-medium text-neutral-500">
+ {customer.email}
+ </span>
+ <CopyButton
+ value={customer.email}
+ variant="neutral"
+ className="p-1 [&>*]:h-3 [&>*]:w-3"
+ successMessage="Copied email to clipboard!"
+ />
+ </div>
+ )}
+ </div>
</div>
</div>
);