mirror of
https://github.com/skidoodle/hostinfo
synced 2026-04-28 09:37:37 +02:00
handle local domains
This commit is contained in:
@@ -4,8 +4,8 @@ import { codes } from '@/utils/codes';
|
||||
export default function ServerInfo({ data }: { data: ServerData }) {
|
||||
|
||||
const countryName = data.country
|
||||
? codes[data.country.toLowerCase()] || "N/A"
|
||||
: "N/A";
|
||||
? codes[data.country.toLowerCase()] || "N/A"
|
||||
: "N/A";
|
||||
|
||||
if (data.isBrowserResource) {
|
||||
return (
|
||||
@@ -32,13 +32,26 @@ export default function ServerInfo({ data }: { data: ServerData }) {
|
||||
Internal Network
|
||||
</h2>
|
||||
</div>
|
||||
<div className="flex items-center space-x-3">
|
||||
<ServerIcon className="w-6 h-6 text-yellow-400 flex-shrink-0" />
|
||||
<div>
|
||||
<p className="text-sm text-gray-400">IP Address</p>
|
||||
<p className="font-medium">{data.ip}</p>
|
||||
|
||||
{data.ip && (
|
||||
<div className="flex items-center space-x-3">
|
||||
<ServerIcon className="w-6 h-6 text-yellow-400 flex-shrink-0" />
|
||||
<div>
|
||||
<p className="text-sm text-gray-400">IP Address</p>
|
||||
<p className="font-medium">{data.ip}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{data.hostname && (
|
||||
<div className="flex items-center space-x-3">
|
||||
<LinkIcon className="w-6 h-6 text-green-400 flex-shrink-0" />
|
||||
<div>
|
||||
<p className="text-sm text-gray-400">Hostname</p>
|
||||
<p className="font-medium break-all">{data.hostname}</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user