country names

This commit is contained in:
skidoodle 2025-03-15 17:36:24 +01:00
parent 5eb326de05
commit 0b4d6eea5d
No known key found for this signature in database
3 changed files with 322 additions and 1 deletions

View file

@ -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>