1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2024-12-23 07:26:36 +01:00

Merge pull request #5123 from h3poteto/iss-4786

refs #4786 Sort list name in side menu
This commit is contained in:
AkiraFukushima 2024-12-14 16:06:50 +09:00 committed by GitHub
commit cd04359ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 () => {