Skip to content

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

Add note for project creation region selection for local/staging (#27082)

Joshen Lime89c66fafd3d
diff --git a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
index 1665de5ee8d..bfc5366890f 100644
--- a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
@@ -22,6 +22,8 @@ interface RegionSelectorProps {
export const RegionSelector = ({ cloudProvider, field, form }: RegionSelectorProps) => {
const router = useRouter()
+ const showNonProdFields = process.env.NEXT_PUBLIC_ENVIRONMENT !== 'prod'
+
const availableRegions = getAvailableRegions(PROVIDERS[cloudProvider].id)
const { isLoading: isLoadingDefaultRegion } = useDefaultRegionQuery({
@@ -32,7 +34,14 @@ export const RegionSelector = ({ cloudProvider, field, form }: RegionSelectorPro
<FormItemLayout
layout="horizontal"
label="Region"
- description="Select the region closest to your users for the best performance."
+ description={
+ <>
+ {showNonProdFields && (
+ <p>Select the region closest to your users for the best performance.</p>
+ )}
+ <p className="text-warning">Note: Only SG is supported for local/staging projects</p>
+ </>
+ }
>
<Select_Shadcn_
value={field.value}