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 = () => {
Proxy Groups
</Typography>
<List sx={{ borderRadius: 1, boxShadow: 2 }}>
{groups.map((group) => (
<ProxyGroup key={group.name} group={group} />
))}
</List>
{groups.length > 0 && (
<List sx={{ borderRadius: 1, boxShadow: 2 }}>
{groups.map((group) => (
<ProxyGroup key={group.name} group={group} />
))}
</List>
)}
</Box>
);
};
......
......@@ -34,6 +34,8 @@ export async function getProxyInfo() {
each.all = each.all?.map((item) => results[item]).filter((e) => e);
});
groups.sort((a, b) => b.name.localeCompare(a.name));
return {
global,
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