Skip to content

Commit

Permalink
fix(global): server sort
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 9, 2024
1 parent ea385ee commit d582027
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/(main)/ClientComponents/MapTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<AnimatePresence mode="wait">
<m.div
Expand Down Expand Up @@ -46,7 +50,7 @@ const MapTooltip = memo(function MapTooltip() {
overflowY: "auto",
}}
>
{tooltipData.servers.map((server, index) => (
{sortedServers.map((server, index) => (
<div key={index} className="flex items-center gap-1.5 py-0.5">
<span
className={`w-1.5 h-1.5 shrink-0 rounded-full ${
Expand Down

0 comments on commit d582027

Please sign in to comment.