From 3b8ccc4fb396705d8f97f0b9be881066ef9dc63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=93=E9=BC=A0?= <71394853+hamster1963@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:20:39 +0800 Subject: [PATCH] fix: tag order --- app/[locale]/(main)/ClientComponents/ServerListClient.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/[locale]/(main)/ClientComponents/ServerListClient.tsx b/app/[locale]/(main)/ClientComponents/ServerListClient.tsx index 9a66b10..06c8d38 100644 --- a/app/[locale]/(main)/ClientComponents/ServerListClient.tsx +++ b/app/[locale]/(main)/ClientComponents/ServerListClient.tsx @@ -32,6 +32,9 @@ export default function ServerListClient() { const allTag = result.map((server) => server.tag).filter((tag) => tag); const uniqueTags = [...new Set(allTag)]; + + uniqueTags.sort((a, b) => a.localeCompare(b)); + uniqueTags.unshift(defaultTag); const sortedServers = result.sort((a, b) => {