| 28 | |
| 29 | export const admins = ['sudo', 'root', 'wheel']; |
| 30 | const sortGroups = groups => { |
| 31 | return groups.sort((a, b) => { |
| 32 | if (a.isAdmin) |
| 33 | return -1; |
| 34 | if (b.isAdmin) |
| 35 | return 1; |
| 36 | if (a.members === b.members) |
| 37 | return a.name.localeCompare(b.name); |
| 38 | else |
| 39 | return b.members - a.members; |
| 40 | }); |
| 41 | }; |
| 42 | |
| 43 | function AccountsPage() { |
| 44 | const [isGroupsExpanded, setIsGroupsExpanded] = useState(false); |