diff --git a/lib/utils/icons.tsx b/lib/utils/icons.tsx index 0fb0469..e1c7d4f 100644 --- a/lib/utils/icons.tsx +++ b/lib/utils/icons.tsx @@ -5,23 +5,42 @@ import { DeviceMobile, DeviceTablet, Desktop, - GoogleLogo, - FacebookLogo, - XLogo, - LinkedinLogo, - InstagramLogo, - GithubLogo, - YoutubeLogo, - RedditLogo, - Robot, Link, - WhatsappLogo, - TelegramLogo, - SnapchatLogo, - PinterestLogo, - ThreadsLogo, - MagnifyingGlass, } from '@phosphor-icons/react' +import { + SiGoogle, + SiFacebook, + SiInstagram, + SiGithub, + SiYoutube, + SiReddit, + SiWhatsapp, + SiTelegram, + SiSnapchat, + SiPinterest, + SiThreads, + SiDuckduckgo, + SiBrave, + SiPerplexity, + SiAnthropic, + SiGooglegemini, + SiGithubcopilot, + SiDiscord, +} from '@icons-pack/react-simple-icons' + +// Inline SVG icons for brands not in @icons-pack/react-simple-icons +function XIcon({ size = 16, color = '#fff' }: { size?: number; color?: string }) { + return +} +function LinkedInIcon({ size = 16, color = '#0A66C2' }: { size?: number; color?: string }) { + return +} +function OpenAIIcon({ size = 16, color = '#fff' }: { size?: number; color?: string }) { + return +} +function BingIcon({ size = 16, color = '#258FFA' }: { size?: number; color?: string }) { + return +} /** * Google's public favicon service base URL. @@ -98,37 +117,39 @@ export function getDeviceIcon(deviceName: string) { return } +const SI = { size: 16 } as const + export function getReferrerIcon(referrerName: string) { if (!referrerName) return const lower = referrerName.toLowerCase() - if (lower.includes('google')) return - if (lower.includes('facebook')) return - if (lower.includes('twitter') || lower.includes('t.co') || lower.includes('x.com')) return - if (lower.includes('linkedin')) return - if (lower.includes('instagram')) return - if (lower.includes('github')) return - if (lower.includes('youtube')) return - if (lower.includes('reddit')) return - if (lower.includes('whatsapp')) return - if (lower.includes('telegram')) return - if (lower.includes('snapchat')) return - if (lower.includes('pinterest')) return - if (lower.includes('threads')) return + // Social / platforms + if (lower.includes('google') && !lower.includes('gemini')) return + if (lower.includes('facebook')) return + if (lower.includes('twitter') || lower.includes('t.co') || lower.includes('x.com')) return + if (lower.includes('linkedin')) return + if (lower.includes('instagram')) return + if (lower.includes('github')) return + if (lower.includes('youtube')) return + if (lower.includes('reddit')) return + if (lower.includes('whatsapp')) return + if (lower.includes('telegram')) return + if (lower.includes('snapchat')) return + if (lower.includes('pinterest')) return + if (lower.includes('threads')) return + if (lower.includes('discord')) return // Search engines - if (lower.includes('bing')) return - if (lower.includes('duckduckgo')) return - if (lower.includes('brave')) return - // AI assistants and search tools - if (lower.includes('chatgpt') || lower.includes('openai')) return - if (lower.includes('perplexity')) return - if (lower.includes('claude') || lower.includes('anthropic')) return - if (lower.includes('gemini')) return - if (lower.includes('copilot')) return - if (lower.includes('deepseek')) return - if (lower.includes('grok') || lower.includes('x.ai')) return - if (lower.includes('phind')) return - if (lower.includes('you.com')) return - // Shared Link (unattributed deep-page traffic) + if (lower.includes('bing')) return + if (lower.includes('duckduckgo')) return + if (lower.includes('brave')) return + // AI assistants + if (lower.includes('chatgpt') || lower.includes('openai')) return + if (lower.includes('perplexity')) return + if (lower.includes('claude') || lower.includes('anthropic')) return + if (lower.includes('gemini')) return + if (lower.includes('copilot')) return + if (lower.includes('deepseek')) return + if (lower.includes('grok') || lower.includes('x.ai')) return + // Shared Link if (lower === 'shared link') return return diff --git a/package-lock.json b/package-lock.json index 69bc254..d128ea3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@ciphera-net/ui": "^0.3.1", "@ducanh2912/next-pwa": "^10.2.9", + "@icons-pack/react-simple-icons": "^13.13.0", "@phosphor-icons/react": "^2.1.10", "@radix-ui/react-icons": "^1.3.2", "@radix-ui/react-navigation-menu": "^1.2.14", @@ -2587,6 +2588,19 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@icons-pack/react-simple-icons": { + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/@icons-pack/react-simple-icons/-/react-simple-icons-13.13.0.tgz", + "integrity": "sha512-B5HhQMIpcSH4z8IZ8HFhD59CboHceKYMpPC9kAwGyKntvPdyJJv26DLu4Z1wAjcCLyrJhf11tMhiQGom9Rxb9g==", + "license": "MIT", + "engines": { + "node": ">=24", + "pnpm": ">=10" + }, + "peerDependencies": { + "react": "^16.13 || ^17 || ^18 || ^19" + } + }, "node_modules/@img/colour": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", diff --git a/package.json b/package.json index efb0f0a..56c41a5 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dependencies": { "@ciphera-net/ui": "^0.3.1", "@ducanh2912/next-pwa": "^10.2.9", + "@icons-pack/react-simple-icons": "^13.13.0", "@phosphor-icons/react": "^2.1.10", "@radix-ui/react-icons": "^1.3.2", "@radix-ui/react-navigation-menu": "^1.2.14",