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
This commit is contained in:
2025-12-11 22:38:54 +01:00
parent 0655692c9e
commit 7c9e157fe9

View File

@ -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) {