"use client"; import { AnimatePresence, m } from "framer-motion"; import { useTranslations } from "next-intl"; import { memo } from "react"; import { useTooltip } from "./TooltipContext"; const MapTooltip = memo(function MapTooltip() { const { tooltipData } = useTooltip(); const t = useTranslations("Global"); if (!tooltipData) return null; const sortedServers = tooltipData.servers.sort((a, b) => { return a.status === b.status ? 0 : a.status ? 1 : -1; }); return ( { e.stopPropagation(); }} >

{tooltipData.country === "China" ? "Mainland China" : tooltipData.country}

{tooltipData.count} {t("Servers")}

{sortedServers.map((server, index) => (
{server.name}
))}
); }); export default MapTooltip;