mirror of
https://github.com/skidoodle/hostinfo
synced 2025-03-16 13:59:38 +01:00
country names
This commit is contained in:
parent
5eb326de05
commit
0b4d6eea5d
3 changed files with 322 additions and 1 deletions
|
@ -1,7 +1,12 @@
|
|||
import { LinkIcon, ServerIcon, IdentificationIcon } from '@heroicons/react/24/outline';
|
||||
import { codes } from '@/utils/codes';
|
||||
|
||||
export default function ServerInfo({ data }: { data: ServerData }) {
|
||||
|
||||
const countryName = data.country
|
||||
? codes[data.country.toLowerCase()] || "N/A"
|
||||
: "N/A";
|
||||
|
||||
if (data.isBrowserResource) {
|
||||
return (
|
||||
<div className="min-w-[300px] bg-gray-900 shadow-2xl p-6 text-white font-sans">
|
||||
|
@ -63,6 +68,14 @@ export default function ServerInfo({ data }: { data: ServerData }) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-3">
|
||||
<IdentificationIcon className="w-6 h-6 text-blue-400 flex-shrink-0" />
|
||||
<div>
|
||||
<p className="text-sm text-gray-400">Location</p>
|
||||
<p className="font-medium">{countryName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-3">
|
||||
<IdentificationIcon className="w-6 h-6 text-red-400 flex-shrink-0" />
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue