fix hostname

This commit is contained in:
2026-03-07 00:27:14 +01:00
parent 55b3b61bbf
commit 56ed5909c7
3 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -23,14 +23,14 @@ export const PublicNetworkView = ({ data, domain }: { data: GeoData, domain: str
<InfoRow
icon={GlobeAltIcon}
label="Hostname"
value={domain}
value={data.hostname || 'N/A'}
canCopy
iconColor="text-indigo-500"
/>
<InfoRow
icon={MapPinIcon}
label="Location"
value={data.countryName || 'Unknown Location'}
value={data.countryName || 'N/A'}
iconColor="text-emerald-500"
/>
<InfoRow
+3
View File
@@ -30,6 +30,7 @@ export const GeoService = {
console.warn('Geo lookup failed for', ip, error);
return {
ip,
hostname: null,
countryCode: null,
countryName: 'Unknown',
city: null,
@@ -46,6 +47,7 @@ export const GeoService = {
getLocalData(ip: string): GeoData {
return {
ip,
hostname: null,
countryCode: null,
countryName: 'Local Network',
city: null,
@@ -61,6 +63,7 @@ export const GeoService = {
transform(ip: string, apiData: any): GeoData {
return {
ip,
hostname: apiData.hostname || null,
countryCode: apiData.country || null,
countryName: apiData.country ? (codes[apiData.country.toLowerCase()] || apiData.country) : null,
city: apiData.city || null,
+1
View File
@@ -1,5 +1,6 @@
export interface GeoData {
ip: string;
hostname: string | null;
countryCode: string | null;
countryName: string | null;
city: string | null;