From d582027fcf479f77d56ee0ee9456f76c88147561 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Tue, 10 Dec 2024 00:38:35 +0800 Subject: [PATCH] fix(global): server sort --- app/(main)/ClientComponents/MapTooltip.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/(main)/ClientComponents/MapTooltip.tsx b/app/(main)/ClientComponents/MapTooltip.tsx index b77abe6..a9aa099 100644 --- a/app/(main)/ClientComponents/MapTooltip.tsx +++ b/app/(main)/ClientComponents/MapTooltip.tsx @@ -12,6 +12,10 @@ const MapTooltip = memo(function MapTooltip() { if (!tooltipData) return null; + const sortedServers = tooltipData.servers.sort((a, b) => { + return a.status === b.status ? 0 : a.status ? 1 : -1; + }); + return ( - {tooltipData.servers.map((server, index) => ( + {sortedServers.map((server, index) => (