mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: update tld table
This commit is contained in:
@@ -38,6 +38,11 @@ function TldTable(filters: FiltersType) {
|
|||||||
getTldList(params).then((data) => {
|
getTldList(params).then((data) => {
|
||||||
setTotal(data['hydra:totalItems'])
|
setTotal(data['hydra:totalItems'])
|
||||||
setDataTable(data['hydra:member'].map((tld: Tld) => {
|
setDataTable(data['hydra:member'].map((tld: Tld) => {
|
||||||
|
|
||||||
|
const rowData = {
|
||||||
|
key: tld.tld,
|
||||||
|
TLD: <Typography.Text code>{punycode.toUnicode(tld.tld)}</Typography.Text>
|
||||||
|
}
|
||||||
switch (filters.type) {
|
switch (filters.type) {
|
||||||
case 'ccTLD':
|
case 'ccTLD':
|
||||||
let countryName
|
let countryName
|
||||||
@@ -49,22 +54,17 @@ function TldTable(filters: FiltersType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
key: tld.tld,
|
...rowData,
|
||||||
TLD: punycode.toUnicode(tld.tld),
|
|
||||||
Flag: toEmoji(tld.tld),
|
Flag: toEmoji(tld.tld),
|
||||||
Country: countryName
|
Country: countryName
|
||||||
}
|
}
|
||||||
case 'gTLD':
|
case 'gTLD':
|
||||||
return {
|
return {
|
||||||
key: tld.tld,
|
...rowData,
|
||||||
TLD: punycode.toUnicode(tld.tld),
|
|
||||||
Operator: tld.registryOperator
|
Operator: tld.registryOperator
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return {
|
return rowData
|
||||||
key: tld.tld,
|
|
||||||
TLD: punycode.toUnicode(tld.tld)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user