diff --git a/app/[locale]/(main)/ClientComponents/ServerListClient.tsx b/app/[locale]/(main)/ClientComponents/ServerListClient.tsx index 06c8d38..00e3594 100644 --- a/app/[locale]/(main)/ClientComponents/ServerListClient.tsx +++ b/app/[locale]/(main)/ClientComponents/ServerListClient.tsx @@ -30,12 +30,7 @@ export default function ServerListClient() { const { result } = data; - 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) => { const displayIndexDiff = (b.display_index || 0) - (a.display_index || 0); @@ -43,6 +38,11 @@ export default function ServerListClient() { return a.id - b.id; }); + const allTag = sortedServers.map((server) => server.tag).filter((tag) => tag); + const uniqueTags = [...new Set(allTag)]; + + uniqueTags.unshift(defaultTag); + const filteredServers = tag === defaultTag ? sortedServers