mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Fix: sort devices list
This commit is contained in:
parent
0c487ab496
commit
492042cf58
@ -126,7 +126,7 @@ export default function Connections() {
|
||||
), [connections])
|
||||
const devices = useMemo(() => {
|
||||
const gb = groupBy(connections, 'metadata.sourceIP')
|
||||
return Object.keys(gb).map(key => ({ label: key, number: gb[key].length }))
|
||||
return Object.keys(gb).map(key => ({ label: key, number: gb[key].length })).sort((a, b) => a.label.localeCompare(b.label))
|
||||
}, [connections])
|
||||
|
||||
// table
|
||||
|
Loading…
x
Reference in New Issue
Block a user