diff --git a/src/components/Table.tsx b/src/components/Table.tsx index 28c8b1a..c4160b4 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -8,7 +8,7 @@ const Table: React.FC<{ }> = ({ content, type }) => { return ( typeof content !== 'string' && ( -
+

{type.toUpperCase()}

diff --git a/src/views/Results.tsx b/src/views/Results.tsx index 95dd8bf..eb259c7 100644 --- a/src/views/Results.tsx +++ b/src/views/Results.tsx @@ -18,6 +18,7 @@ import Markers from '../components/Markers'; import { isWordpressInstalled } from '../services/wpCheck.service'; import { isCdnActive } from '../services/cdnCheck.service'; import Meta from '../components/Meta'; +import Loading from '../components/Loading'; interface WhoIsData { result?: Record; @@ -43,6 +44,12 @@ const Results = () => { ); }, [sslData, searchParams]); + const filteredDnsData = + dnsData && + Object.entries(dnsData).filter( + ([_type, answer]) => typeof answer !== 'string' + ); + const [isLoading, setIsLoading] = useState(false); const [isWhoIsLoading, setIsWhoisLoading] = useState(false); const [isDnsLoading, setIsDnsLoading] = useState(false); @@ -68,7 +75,6 @@ const Results = () => { setIsSslLoading(false); }), getDomainInfo(domain).then(data => { - console.log(data); setWhoIsData(data); setIsWhoisLoading(false); }), @@ -121,14 +127,15 @@ const Results = () => { />

DNS Info

-
+
3 ? 'grid-rows-2' : '' + } justify-center lg:justify-normal xl:grid-flow-col lg:auto-cols-auto break-words gap-4`} + > {isDnsLoading ? ( -
- -
+ ) : ( - dnsData && - Object.entries(dnsData).map(([type, answer]) => { + filteredDnsData?.map(([type, answer]) => { return (