Skip to content
Snippets Groups Projects
Commit 1e2e6ca8 authored by GyDi's avatar GyDi
Browse files

feat: sort groups

parent eddf10e7
No related branches found
No related tags found
No related merge requests found
...@@ -21,11 +21,13 @@ const ProxyPage = () => { ...@@ -21,11 +21,13 @@ const ProxyPage = () => {
Proxy Groups Proxy Groups
</Typography> </Typography>
<List sx={{ borderRadius: 1, boxShadow: 2 }}> {groups.length > 0 && (
{groups.map((group) => ( <List sx={{ borderRadius: 1, boxShadow: 2 }}>
<ProxyGroup key={group.name} group={group} /> {groups.map((group) => (
))} <ProxyGroup key={group.name} group={group} />
</List> ))}
</List>
)}
</Box> </Box>
); );
}; };
......
...@@ -34,6 +34,8 @@ export async function getProxyInfo() { ...@@ -34,6 +34,8 @@ export async function getProxyInfo() {
each.all = each.all?.map((item) => results[item]).filter((e) => e); each.all = each.all?.map((item) => results[item]).filter((e) => e);
}); });
groups.sort((a, b) => b.name.localeCompare(a.name));
return { return {
global, global,
groups, groups,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment