mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
chore: fix region sorting to prioritise available instead of disabled
This commit is contained in:
1 parent
1d8d1223f5
commit
544ec07eb7
1 file changed
+2
-2
@@ -15,8 +15,8 @@ export function filterRegions(regions: Models.ConsoleRegion[]): RegionOption[] {
|
||||
return regions
|
||||
.filter((region) => region.$id !== 'default')
|
||||
.sort((a, b) => {
|
||||
if (a.disabled && !b.disabled) return 1;
|
||||
if (!a.disabled && b.disabled) return -1;
|
||||
if (a.available && !b.available) return 1;
|
||||
if (!a.available && b.available) return -1;
|
||||
return a.name.localeCompare(b.name);
|
||||
})
|
||||
.map((region) => ({
|
||||
|
||||
Reference in new issue
Block a user