From c17e233990ce02dc7d1bb60b0fc7728d97563bde Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Thu, 11 Dec 2025 22:38:54 +0100 Subject: [PATCH] feat(intel): improve TLD filters + load more data - Geo filter now uses backend type='ccTLD' instead of hardcoded list - Tech filter expanded with more tech-related TLDs - Load 500 TLDs instead of 100 for better coverage --- frontend/src/app/terminal/intel/page.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/terminal/intel/page.tsx b/frontend/src/app/terminal/intel/page.tsx index d2fc38a..29ccb40 100755 --- a/frontend/src/app/terminal/intel/page.tsx +++ b/frontend/src/app/terminal/intel/page.tsx @@ -252,7 +252,7 @@ export default function IntelPage() { const loadData = useCallback(async () => { setLoading(true) try { - const response = await api.getTldOverview(100, 0, 'popularity') + const response = await api.getTldOverview(500, 0, 'popularity') const mapped: TLDData[] = (response.tlds || []).map((tld: any) => ({ tld: tld.tld, min_price: tld.min_registration_price, @@ -300,8 +300,14 @@ export default function IntelPage() { const filteredData = useMemo(() => { let data = tldData - if (filterType === 'tech') data = data.filter(t => ['ai', 'io', 'app', 'dev', 'tech', 'cloud'].includes(t.tld)) - if (filterType === 'geo') data = data.filter(t => ['us', 'uk', 'de', 'ch', 'fr', 'eu'].includes(t.tld)) + // Tech filter: common tech-related TLDs + const techTlds = ['ai', 'io', 'app', 'dev', 'tech', 'cloud', 'digital', 'software', 'code', 'systems', 'network', 'data', 'cyber', 'online', 'web', 'api', 'hosting'] + if (filterType === 'tech') data = data.filter(t => techTlds.includes(t.tld) || t.tld === 'io' || t.tld === 'ai') + + // Geo filter: all country-code TLDs (ccTLD type from backend) + if (filterType === 'geo') data = data.filter(t => t.type === 'ccTLD') + + // Budget filter: registration under $10 if (filterType === 'budget') data = data.filter(t => t.min_price < 10) if (searchQuery) {