Skip to content

Commit

Permalink
chore: launch au region (#6701)
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun authored Oct 21, 2024
1 parent 2760eda commit aab356d
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions packages/console/src/components/CreateTenantModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import CreateTenantHeaderIcon from '@/assets/icons/create-tenant-header.svg?reac
import { useCloudApi } from '@/cloud/hooks/use-cloud-api';
import { type TenantResponse } from '@/cloud/types/router';
import Region, { RegionName } from '@/components/Region';
import { isDevFeaturesEnabled } from '@/consts/env';
import Button from '@/ds-components/Button';
import DangerousRaw from '@/ds-components/DangerousRaw';
import FormField from '@/ds-components/FormField';
Expand Down Expand Up @@ -126,21 +125,18 @@ function CreateTenantModal({ isOpen, onClose }: Props) {
render={({ field: { onChange, value, name } }) => (
<RadioGroup type="small" name={name} value={value} onChange={onChange}>
{/* Manually maintaining the list of regions to avoid unexpected changes. We may consider using an API in the future. */}
{[RegionName.EU, RegionName.US, RegionName.AU].map(
(region) =>
(isDevFeaturesEnabled || region !== RegionName.AU) && (
<Radio
key={region}
title={
<DangerousRaw>
<Region regionName={region} />
</DangerousRaw>
}
value={region}
isDisabled={isSubmitting}
/>
)
)}
{[RegionName.EU, RegionName.US, RegionName.AU].map((region) => (
<Radio
key={region}
title={
<DangerousRaw>
<Region regionName={region} />
</DangerousRaw>
}
value={region}
isDisabled={isSubmitting}
/>
))}
</RadioGroup>
)}
/>
Expand Down

0 comments on commit aab356d

Please sign in to comment.