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 {regionNames} from "../../i18n";
|
||||||
import useBreakpoint from "../../hooks/useBreakpoint";
|
import useBreakpoint from "../../hooks/useBreakpoint";
|
||||||
import {ColumnType} from "antd/es/table";
|
import {ColumnType} from "antd/es/table";
|
||||||
|
import punycode from "punycode/punycode";
|
||||||
|
|
||||||
const {Text, Paragraph} = Typography
|
const {Text, Paragraph} = Typography
|
||||||
|
|
||||||
@ -49,20 +50,20 @@ function TldTable(filters: FiltersType) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
key: tld.tld,
|
key: tld.tld,
|
||||||
TLD: tld.tld,
|
TLD: tld.tld.startsWith('xn--') ? punycode.toUnicode(tld.tld) : tld.tld,
|
||||||
Flag: toEmoji(tld.tld),
|
Flag: toEmoji(tld.tld),
|
||||||
Country: countryName
|
Country: countryName
|
||||||
}
|
}
|
||||||
case 'gTLD':
|
case 'gTLD':
|
||||||
return {
|
return {
|
||||||
key: tld.tld,
|
key: tld.tld,
|
||||||
TLD: tld.tld,
|
TLD: tld.tld.startsWith('xn--') ? punycode.toUnicode(tld.tld) : tld.tld,
|
||||||
Operator: tld.registryOperator
|
Operator: tld.registryOperator
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return {
|
return {
|
||||||
key: tld.tld,
|
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