diff --git a/components/dashboard/ExportModal.tsx b/components/dashboard/ExportModal.tsx index bd0da91..86ccd64 100644 --- a/components/dashboard/ExportModal.tsx +++ b/components/dashboard/ExportModal.tsx @@ -7,6 +7,7 @@ import jsPDF from 'jspdf' import autoTable from 'jspdf-autotable' import type { DailyStat } from './Chart' import { formatNumber, formatDuration } from '@/lib/utils/format' +import { getReferrerDisplayName } from '@/lib/utils/icons' import type { TopPage, TopReferrer } from '@/lib/api/stats' interface ExportModalProps { @@ -278,7 +279,7 @@ export default function ExportModal({ isOpen, onClose, data, stats, topPages, to doc.text('Top Referrers', 14, finalY) finalY += 5 - const referrersData = topReferrers.slice(0, 10).map(r => [r.referrer, formatNumber(r.pageviews)]) + const referrersData = topReferrers.slice(0, 10).map(r => [getReferrerDisplayName(r.referrer), formatNumber(r.pageviews)]) autoTable(doc, { startY: finalY, diff --git a/components/dashboard/TopReferrers.tsx b/components/dashboard/TopReferrers.tsx index 4974f5d..05add44 100644 --- a/components/dashboard/TopReferrers.tsx +++ b/components/dashboard/TopReferrers.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react' import { formatNumber } from '@/lib/utils/format' -import { getReferrerFavicon, getReferrerIcon } from '@/lib/utils/icons' +import { getReferrerDisplayName, getReferrerFavicon, getReferrerIcon } from '@/lib/utils/icons' import { Modal, GlobeIcon } from '@ciphera-net/ui' import { getTopReferrers, TopReferrer } from '@/lib/api/stats' @@ -98,7 +98,7 @@ export default function TopReferrers({ referrers, collectReferrers = true, siteI