mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
Merge pull request #5931 from logto-io/gao-support-multi-region-paid-plans
refactor(console): support multi-region for paid plans
This commit is contained in:
commit
3f910af825
3 changed files with 8 additions and 7 deletions
|
@ -23,16 +23,16 @@ export default function Main() {
|
|||
return <AppLoading />;
|
||||
}
|
||||
|
||||
// If current tenant ID is not set, but the defaultTenantId is available.
|
||||
if (defaultTenantId) {
|
||||
return <Redirect toTenantId={defaultTenantId} />;
|
||||
}
|
||||
|
||||
// A new user has just signed up, redirect them to the onboarding flow.
|
||||
if (isOnboarding) {
|
||||
return <Navigate to={GlobalRoute.Onboarding} />;
|
||||
}
|
||||
|
||||
// If current tenant ID is not set, but the defaultTenantId is available.
|
||||
if (defaultTenantId) {
|
||||
return <Redirect toTenantId={defaultTenantId} />;
|
||||
}
|
||||
|
||||
// If user has pending invitations (onboarding will be skipped), show the invitation list and allow them to quick join.
|
||||
if (isCloud && data?.length) {
|
||||
return <InvitationList invitations={data} />;
|
||||
|
|
|
@ -41,8 +41,8 @@ function SelectTenantPlanModal({ tenantData, onClose }: Props) {
|
|||
const { id: planId } = plan;
|
||||
try {
|
||||
if (planId === ReservedPlanId.Free) {
|
||||
const { name, tag } = tenantData;
|
||||
const newTenant = await cloudApi.post('/api/tenants', { body: { name, tag } });
|
||||
const { name, tag, regionName } = tenantData;
|
||||
const newTenant = await cloudApi.post('/api/tenants', { body: { name, tag, regionName } });
|
||||
|
||||
reportToGoogle(GtagConversionId.CreateProductionTenant, { transactionId: newTenant.id });
|
||||
onClose(newTenant);
|
||||
|
|
|
@ -59,6 +59,7 @@ const useSubscribe = () => {
|
|||
tenantId,
|
||||
tenantName: tenantData?.name,
|
||||
tenantTag: tenantData?.tag,
|
||||
tenantRegionName: tenantData?.regionName,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue