import { GetNezhaData } from "@/lib/serverFetch"; import { geoJsonString } from "../../../lib/geo-json-string"; import GlobalInfo from "./GlobalInfo"; import { InteractiveMap } from "./InteractiveMap"; export default async function ServerGlobal() { const nezhaServerList = await GetNezhaData(); const countrytList: string[] = []; const serverCounts: { [key: string]: number } = {}; nezhaServerList.result.forEach((server) => { if (server.host.CountryCode) { const countryCode = server.host.CountryCode.toUpperCase(); if (!countrytList.includes(countryCode)) { countrytList.push(countryCode); } serverCounts[countryCode] = (serverCounts[countryCode] || 0) + 1; } }); countrytList.push("TW"); countrytList.push("SG"); countrytList.push("RU"); const width = 900; const height = 500; const geoJson = JSON.parse(geoJsonString); const filteredFeatures = geoJson.features.filter( (feature: any) => feature.properties.iso_a3 !== "", ); return (
); }