We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1d8d122 + 110c45f commit 496b6deCopy full SHA for 496b6de
1 file changed
src/lib/helpers/regions.ts
@@ -15,8 +15,15 @@ export function filterRegions(regions: Models.ConsoleRegion[]): RegionOption[] {
15
return regions
16
.filter((region) => region.$id !== 'default')
17
.sort((a, b) => {
18
- if (a.disabled && !b.disabled) return 1;
19
- if (!a.disabled && b.disabled) return -1;
+ // Check if regions are truly available (not disabled and available)
+ const aAvailable = !a.disabled && a.available;
20
+ const bAvailable = !b.disabled && b.available;
21
+
22
+ // Prioritize truly available regions
23
+ if (aAvailable && !bAvailable) return -1;
24
+ if (!aAvailable && bAvailable) return 1;
25
26
+ // Within the same availability group, sort alphabetically
27
return a.name.localeCompare(b.name);
28
})
29
.map((region) => ({
0 commit comments