Sort server list alphabetically

This commit is contained in:
Martin Fournier 2022-01-09 05:43:50 -05:00
parent 0de588ee17
commit d6fa672fac

@ -53,7 +53,7 @@ export function ServerDropdown(props: IProps): React.ReactElement {
} }
const servers = []; const servers = [];
for (const server of GetAllServers()) { for (const server of GetAllServers().sort((a, b) => a.hostname.localeCompare(b.hostname))) {
if (isValidServer(server)) { if (isValidServer(server)) {
servers.push( servers.push(
<MenuItem key={server.hostname} value={server.hostname}> <MenuItem key={server.hostname} value={server.hostname}>