From 371e2f324d5fc69dddf7060299ab302ee892f7e5 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 14 Dec 2024 16:01:42 +0900 Subject: [PATCH] refs #4786 Sort list name in side menu --- renderer/components/layouts/timelines.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/renderer/components/layouts/timelines.tsx b/renderer/components/layouts/timelines.tsx index 0d402f2d..3d405da4 100644 --- a/renderer/components/layouts/timelines.tsx +++ b/renderer/components/layouts/timelines.tsx @@ -65,7 +65,15 @@ export default function Layout({ children }: LayoutProps) { setClient(c) const f = async () => { const res = await c.getLists() - setLists(res.data) + setLists( + res.data.sort((a, b) => { + if (a.title > b.title) { + return 1 + } else { + return -1 + } + }) + ) } f() const g = async () => {