From 2fc623c14e820ea1b6d353d04790ea33b488d624 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Sun, 18 Jan 2026 16:57:54 +0100 Subject: [PATCH] feat(analytics): make top page links clickable in dashboard --- app/sites/[id]/page.tsx | 7 ++++++- components/dashboard/ContentStats.tsx | 21 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/app/sites/[id]/page.tsx b/app/sites/[id]/page.tsx index 9b5e401..280b81d 100644 --- a/app/sites/[id]/page.tsx +++ b/app/sites/[id]/page.tsx @@ -208,7 +208,12 @@ export default function SiteDashboardPage() {
- +
diff --git a/components/dashboard/ContentStats.tsx b/components/dashboard/ContentStats.tsx index f1119f7..3f8c8a1 100644 --- a/components/dashboard/ContentStats.tsx +++ b/components/dashboard/ContentStats.tsx @@ -9,13 +9,14 @@ interface ContentStatsProps { topPages: TopPage[] entryPages: TopPage[] exitPages: TopPage[] + domain: string } type Tab = 'top_pages' | 'entry_pages' | 'exit_pages' const LIMIT = 7 -export default function ContentStats({ topPages, entryPages, exitPages }: ContentStatsProps) { +export default function ContentStats({ topPages, entryPages, exitPages, domain }: ContentStatsProps) { const [activeTab, setActiveTab] = useState('top_pages') const [isModalOpen, setIsModalOpen] = useState(false) @@ -86,7 +87,14 @@ export default function ContentStats({ topPages, entryPages, exitPages }: Conten {displayedData.map((page, index) => (
- {page.path} + + {page.path} +
{formatNumber(page.pageviews)} @@ -114,7 +122,14 @@ export default function ContentStats({ topPages, entryPages, exitPages }: Conten {data.map((page, index) => (
- {page.path} + + {page.path} +
{formatNumber(page.pageviews)}