From cd5060ed6a7c1aceafcf1f4f3bc889d1830311b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Fri, 2 Aug 2024 22:31:04 +0200 Subject: [PATCH] feat: update tld table --- assets/pages/info/TldPage.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/pages/info/TldPage.tsx b/assets/pages/info/TldPage.tsx index 14d10f6..6467895 100644 --- a/assets/pages/info/TldPage.tsx +++ b/assets/pages/info/TldPage.tsx @@ -38,6 +38,11 @@ function TldTable(filters: FiltersType) { getTldList(params).then((data) => { setTotal(data['hydra:totalItems']) setDataTable(data['hydra:member'].map((tld: Tld) => { + + const rowData = { + key: tld.tld, + TLD: {punycode.toUnicode(tld.tld)} + } switch (filters.type) { case 'ccTLD': let countryName @@ -49,22 +54,17 @@ function TldTable(filters: FiltersType) { } return { - key: tld.tld, - TLD: punycode.toUnicode(tld.tld), + ...rowData, Flag: toEmoji(tld.tld), Country: countryName } case 'gTLD': return { - key: tld.tld, - TLD: punycode.toUnicode(tld.tld), + ...rowData, Operator: tld.registryOperator } default: - return { - key: tld.tld, - TLD: punycode.toUnicode(tld.tld) - } + return rowData } })) })