Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add region code to region selection in project and replica creation (#39071)

Joshen Limc04eec64684f
diff --git a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
index 7e4eaeedc4d..9dbc26c80f0 100644
--- a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
@@ -148,23 +148,28 @@ export const RegionSelector = ({
value={value.name}
className="w-full [&>:nth-child(2)]:w-full"
>
- <div className="flex flex-row items-center justify-between w-full">
+ <div className="flex flex-row items-center justify-between w-full gap-x-2">
<div className="flex items-center gap-x-3">
<img
alt="region icon"
className="w-5 rounded-sm"
src={`${BASE_PATH}/img/regions/${value.code}.svg`}
/>
- <span className="text-foreground">{value.name}</span>
+ <div className="flex items-center gap-x-2">
+ <span className="text-foreground">{value.name}</span>
+ <span className="text-xs text-foreground-lighter font-mono">
+ {value.code}
+ </span>
+ </div>
</div>
- <div>
- {recommendedSpecificRegions.has(value.code) && (
+ {recommendedSpecificRegions.has(value.code) && (
+ <div>
<Badge variant="success" className="mr-1">
Recommended
</Badge>
- )}
- </div>
+ </div>
+ )}
</div>
</SelectItem_Shadcn_>
)
diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DeployNewReplicaPanel.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DeployNewReplicaPanel.tsx
index d43bd7b0c20..e6f55fac5b2 100644
--- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DeployNewReplicaPanel.tsx
+++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DeployNewReplicaPanel.tsx
@@ -447,7 +447,10 @@ const DeployNewReplicaPanel = ({
/>
)}
>
- {region.name}
+ <p className="flex items-center gap-x-2">
+ <span>{region.name}</span>
+ <span className="text-xs text-foreground-lighter font-mono">{region.region}</span>
+ </p>
</Listbox.Option>
))}
</Listbox>