"use client"; import { geoEquirectangular, geoPath } from "d3-geo"; import { AnimatePresence, m } from "framer-motion"; import { useTranslations } from "next-intl"; import { useState } from "react"; interface InteractiveMapProps { countries: string[]; serverCounts: { [key: string]: number }; width: number; height: number; filteredFeatures: any[]; } export function InteractiveMap({ countries, serverCounts, width, height, filteredFeatures, }: InteractiveMapProps) { const t = useTranslations("Global"); const [tooltipData, setTooltipData] = useState<{ centroid: [number, number]; country: string; count: number; } | null>(null); const projection = geoEquirectangular() .scale(140) .translate([width / 2, height / 2]) .rotate([-12, 0, 0]); const path = geoPath().projection(projection); return (
{tooltipData.country}
{tooltipData.count} {t("Servers")}