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 (#6889)

should not apply dev guard
This commit is contained in:
simeng-li 2024-12-16 16:21:50 +08:00 committed by GitHub
parent a6aa235289
commit bbbfd01d7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 },
}) })