From 4064f7eabfe14010c2cbb535594f7bf754eec4fe Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Mon, 23 Mar 2026 13:12:57 +0100 Subject: [PATCH] fix(referrers): prevent t.co substring match on reddit.com "reddit.com".includes("t.co") was true, causing Reddit to show the X icon. Use exact match or slash-delimited check instead. --- lib/utils/icons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/icons.tsx b/lib/utils/icons.tsx index af5867c..a4e836c 100644 --- a/lib/utils/icons.tsx +++ b/lib/utils/icons.tsx @@ -130,7 +130,7 @@ export function getReferrerIcon(referrerName: string) { // Social / platforms if (lower.includes('google') && !lower.includes('gemini')) return if (lower.includes('facebook') || lower === 'fb') return - if (lower.includes('twitter') || lower.includes('t.co') || lower.includes('x.com')) return + if (lower.includes('twitter') || lower === 't.co' || lower.includes('t.co/') || lower.includes('x.com')) return if (lower.includes('linkedin')) return if (lower.includes('instagram') || lower === 'ig') return if (lower.includes('github')) return