Skip to content

Commit

Permalink
ip page improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aelew committed Feb 6, 2024
1 parent 872e135 commit fb96b56
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/app/(tools)/ip/[ip]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@ export default async function IPLookupResultPage({
' ' +
result.location.country,
'Postal Code': () => result.location.postal,
ISP: () => {
ASN: () => {
if (!result.asn) {
return null;
}
return (
<>
<p className="font-medium">{result.asn.name}</p>
<p className="font-medium">
{result.asn.name}
<span className="ml-1 font-mono text-xs">({result.asn.asn})</span>
</p>
{result.asn.domain && (
<p className="text-xs">
Domain:{' '}
Expand All @@ -99,10 +102,11 @@ export default async function IPLookupResultPage({
</p>
<p className="text-xs">
Type:{' '}
<span className="font-mono">{capitalize(result.asn.type)}</span>
</p>
<p className="text-xs">
ASN: <span className="font-mono">{result.asn.asn.slice(2)}</span>
<span className="font-mono">
{result.asn.type === 'isp'
? 'ISP'
: capitalize(result.asn.type)}
</span>
</p>
</>
);
Expand Down

0 comments on commit fb96b56

Please sign in to comment.