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:
commit
cd04359ae0
@ -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 () => {
|
||||
|
Loading…
Reference in New Issue
Block a user