From 29b545706e967c05d32ad401436ff0a193edf459 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Fri, 28 Feb 2025 09:32:15 +0800 Subject: [PATCH] fix: ensure unique keys for map features by including index in key prop --- app/(main)/ClientComponents/main/InteractiveMap.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(main)/ClientComponents/main/InteractiveMap.tsx b/app/(main)/ClientComponents/main/InteractiveMap.tsx index 4ceec0b..7ad2861 100644 --- a/app/(main)/ClientComponents/main/InteractiveMap.tsx +++ b/app/(main)/ClientComponents/main/InteractiveMap.tsx @@ -56,14 +56,14 @@ export function InteractiveMap({ fill="transparent" onMouseEnter={() => setTooltipData(null)} /> - {filteredFeatures.map((feature) => { + {filteredFeatures.map((feature, index) => { const isHighlighted = countries.includes(feature.properties.iso_a2_eh) const serverCount = serverCounts[feature.properties.iso_a2_eh] || 0 return (