"use client" import { useTooltip } from "@/app/context/tooltip-context" import { useTranslations } from "next-intl" import { memo } from "react" 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