From 787598856f74106d5cc7e1e9020dd69b6792b96c Mon Sep 17 00:00:00 2001 From: Felix Wotschofsky Date: Sun, 5 Nov 2023 16:53:22 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20Whois=20failing=20to=20load=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lookup/[domain]/whois/page.tsx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/app/lookup/[domain]/whois/page.tsx b/app/lookup/[domain]/whois/page.tsx index 36e9351..0c0ce9f 100644 --- a/app/lookup/[domain]/whois/page.tsx +++ b/app/lookup/[domain]/whois/page.tsx @@ -4,7 +4,7 @@ import whoiser, { type WhoisSearchResult } from 'whoiser'; const lookupWhois = async (domain: string) => { const result = await whoiser(domain, { raw: true, - timeout: 3000, + timeout: 5000, }); const mappedResults: Record = {}; @@ -28,16 +28,20 @@ const WhoisResultsPage: FC = async ({ return ( <> - {Object.keys(data).map((key) => ( - -

{key}

- - {data[key].split('\n').map((line, index) => ( -

{line}

- ))} -
-
- ))} + {Object.entries(data) + .filter(([_key, value]) => Boolean(value)) + .map(([key, value]) => ( + +

+ {key} +

+ + {value.split('\n').map((line, index) => ( +

{line}

+ ))} +
+
+ ))} ); };