The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix page
Steven Teyf68dc67192d8
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/wrapped/[year]/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/wrapped/[year]/page.tsxindex c4cc53f948..67f30cc49b 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/wrapped/[year]/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/wrapped/[year]/page.tsx@@ -1,5 +1,6 @@import { prisma } from "@dub/prisma";-import { DUB_WORDMARK, smartTruncate } from "@dub/utils";+import { BlurImage, ExpandingArrow } from "@dub/ui";+import { DICEBEAR_AVATAR_URL, DUB_WORDMARK, smartTruncate } from "@dub/utils";import { COUNTRIES } from "@dub/utils/src/constants/countries";import NumberFlow from "@number-flow/react";import { redirect } from "next/navigation";@@ -62,13 +63,13 @@ async function WrappedPageRSC({ slug, year }: { slug: string; year: string }) {backgroundPosition: "center",}}>- {workspace.logo && (- <img- src={workspace.logo}- alt={workspace.name}- className="h-8 rounded-lg"- />- )}+ <BlurImage+ src={workspace.logo || `${DICEBEAR_AVATAR_URL}${workspace.name}`}+ alt={workspace.name}+ className="h-8 rounded-lg"+ width={32}+ height={32}+ /><h2 className="mt-1 text-xl font-semibold">{workspace.name}</h2></div><div className="grid w-full grid-cols-2 gap-2 p-4">@@ -96,7 +97,7 @@ async function WrappedPageRSC({ slug, year }: { slug: string; year: string }) {const StatCard = ({ title, value }: { title: string; value: number }) => {return (<div className="text-center">- <h3 className="font-medium text-neutral-400">{title}</h3>+ <h3 className="font-medium text-neutral-500">{title}</h3><NumberFlow value={value} className="text-lg font-medium text-black" /></div>);@@ -119,7 +120,21 @@ const StatTable = ({const [domain, ...pathParts] = item.split("/");const path = pathParts.join("/") || "_root";return (- <div key={index} className="flex justify-between py-1.5">+ <a+ href={`/${workspaceSlug}/analytics?${new URLSearchParams({+ ...(title === "Top Links"+ ? {+ domain,+ key: path,+ }+ : {+ country: item,+ }),+ interval: "1y",+ }).toString()}`}+ key={index}+ className="group flex justify-between py-1.5"+ ><div className="flex items-center gap-2">{title === "Top Countries" && (<img@@ -128,22 +143,20 @@ const StatTable = ({className="size-4"/>)}- <div className="text-left font-medium text-black">- {title === "Top Links" ? (- <a- href={`https://app.dub.co/${workspaceSlug}/analytics?domain=${domain}&key=${path}&interval=1y`}- target="_blank"- className="underline-offset-2 hover:underline"- >- {smartTruncate(item, 33)} ↗- </a>- ) : (- <p>{COUNTRIES[item]}</p>- )}+ <div className="flex gap-0.5">+ <p className="font-medium text-black">+ {title === "Top Links"+ ? smartTruncate(item, 33)+ : COUNTRIES[item]}{" "}+ </p>+ <ExpandingArrow className="size-3" /></div></div>- <NumberFlow value={count} className="text-neutral-600" />- </div>+ <NumberFlow+ value={count}+ className="text-neutral-600 group-hover:text-black"+ />+ </a>);})}</div>