mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-18 10:15:41 +00:00
feat: convert punycode to Unicode in TldPage
This commit is contained in:
parent
cc9f39fc40
commit
d02cf374c4
@ -5,6 +5,7 @@ import {t} from 'ttag'
|
||||
import {regionNames} from "../../i18n";
|
||||
import useBreakpoint from "../../hooks/useBreakpoint";
|
||||
import {ColumnType} from "antd/es/table";
|
||||
import punycode from "punycode/punycode";
|
||||
|
||||
const {Text, Paragraph} = Typography
|
||||
|
||||
@ -49,20 +50,20 @@ function TldTable(filters: FiltersType) {
|
||||
|
||||
return {
|
||||
key: tld.tld,
|
||||
TLD: tld.tld,
|
||||
TLD: tld.tld.startsWith('xn--') ? punycode.toUnicode(tld.tld) : tld.tld,
|
||||
Flag: toEmoji(tld.tld),
|
||||
Country: countryName
|
||||
}
|
||||
case 'gTLD':
|
||||
return {
|
||||
key: tld.tld,
|
||||
TLD: tld.tld,
|
||||
TLD: tld.tld.startsWith('xn--') ? punycode.toUnicode(tld.tld) : tld.tld,
|
||||
Operator: tld.registryOperator
|
||||
}
|
||||
default:
|
||||
return {
|
||||
key: tld.tld,
|
||||
TLD: tld.tld
|
||||
TLD: tld.tld.startsWith('xn--') ? punycode.toUnicode(tld.tld) : tld.tld
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user