Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Table: React.FC<{
}> = ({ content, type }) => {
return (
typeof content !== 'string' && (
<div className="flex max-w-xl lg:max-w-full lg:max-h-96 flex-col break-words cursor-default shadow-md p-4 rounded-lg border border-neutral">
<div className="flex max-w-xl lg:max-w-full lg:min-w-96 lg:max-h-56 flex-col break-words cursor-default shadow-md p-4 rounded-lg border border-neutral overflow-y-scroll">
<h2 className="font-semibold">{type.toUpperCase()}</h2>
<table className="table table-xs cursor-default">
<thead>
Expand Down
21 changes: 14 additions & 7 deletions src/views/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, any>;
Expand All @@ -43,6 +44,12 @@ const Results = () => {
);
}, [sslData, searchParams]);

const filteredDnsData =
dnsData &&
Object.entries(dnsData).filter(
([_type, answer]) => typeof answer !== 'string'
);

const [isLoading, setIsLoading] = useState<boolean>(false);
const [isWhoIsLoading, setIsWhoisLoading] = useState<boolean>(false);
const [isDnsLoading, setIsDnsLoading] = useState<boolean>(false);
Expand All @@ -68,7 +75,6 @@ const Results = () => {
setIsSslLoading(false);
}),
getDomainInfo(domain).then(data => {
console.log(data);
setWhoIsData(data);
setIsWhoisLoading(false);
}),
Expand Down Expand Up @@ -121,14 +127,15 @@ const Results = () => {
/>
<div className="w-full">
<H1 className="xl:text-start mb-4">DNS Info</H1>
<div className="grid justify-center lg:justify-normal xl:grid-flow-col lg:auto-cols-auto break-words gap-4">
<div
className={`grid ${
filteredDnsData && filteredDnsData.length > 3 ? 'grid-rows-2' : ''
} justify-center lg:justify-normal xl:grid-flow-col lg:auto-cols-auto break-words gap-4`}
>
{isDnsLoading ? (
<div className="flex justify-center items-center h-full">
<span className="loading loading-spinner text-primary"></span>
</div>
<Loading />
) : (
dnsData &&
Object.entries(dnsData).map(([type, answer]) => {
filteredDnsData?.map(([type, answer]) => {
return (
<React.Fragment key={type}>
<Table content={answer} type={type as DnsType} />
Expand Down
Loading