From 6866b6c30d03198e2671052b36ea80e1f6e77a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9C=E6=B5=85?= <370732889@qq.com> Date: Thu, 9 Mar 2023 12:36:11 +0800 Subject: [PATCH] fix: unified tag sorting logic (#1323) --- web/src/components/CreateTagDialog.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/web/src/components/CreateTagDialog.tsx b/web/src/components/CreateTagDialog.tsx index 27c0a9f0..8d45d09e 100644 --- a/web/src/components/CreateTagDialog.tsx +++ b/web/src/components/CreateTagDialog.tsx @@ -103,15 +103,17 @@ const CreateTagDialog: React.FC = (props: Props) => { <>

All tags

- {tagNameList.map((tag) => ( - handleDeleteTag(tag)} - > - #{tag} - - ))} + {Array.from(tagNameList) + .sort() + .map((tag) => ( + handleDeleteTag(tag)} + > + #{tag} + + ))}
)}