0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): should not apply dev guard

should not apply dev guard
This commit is contained in:
simeng-li 2024-12-16 15:57:34 +08:00
parent a6aa235289
commit fc53dcdd42
No known key found for this signature in database
GPG key ID: 14EA7BB1541E8075

View file

@ -5,7 +5,7 @@ import useSWR from 'swr';
import { useCloudApi } from '@/cloud/hooks/use-cloud-api'; import { useCloudApi } from '@/cloud/hooks/use-cloud-api';
import { type TenantUsageAddOnSkus, type NewSubscriptionPeriodicUsage } from '@/cloud/types/router'; import { type TenantUsageAddOnSkus, type NewSubscriptionPeriodicUsage } from '@/cloud/types/router';
import PageMeta from '@/components/PageMeta'; import PageMeta from '@/components/PageMeta';
import { isCloud, isDevFeaturesEnabled } from '@/consts/env'; import { isCloud } from '@/consts/env';
import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider'; import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider';
import { TenantsContext } from '@/contexts/TenantsProvider'; import { TenantsContext } from '@/contexts/TenantsProvider';
import { pickupFeaturedLogtoSkus } from '@/utils/subscription'; import { pickupFeaturedLogtoSkus } from '@/utils/subscription';
@ -37,7 +37,7 @@ function Subscription() {
const { data: usageAddOnSkus, error: usageAddOnSkusError } = useSWR< const { data: usageAddOnSkus, error: usageAddOnSkusError } = useSWR<
TenantUsageAddOnSkus, TenantUsageAddOnSkus,
ResponseError ResponseError
>(isCloud && isDevFeaturesEnabled && `/api/tenants/${currentTenantId}/add-on-skus`, async () => >(isCloud && `/api/tenants/${currentTenantId}/add-on-skus`, async () =>
cloudApi.get(`/api/tenants/:tenantId/subscription/add-on-skus`, { cloudApi.get(`/api/tenants/:tenantId/subscription/add-on-skus`, {
params: { tenantId: currentTenantId }, params: { tenantId: currentTenantId },
}) })