diff --git a/packages/console/src/hooks/use-new-subscription-quota.ts b/packages/console/src/hooks/use-new-subscription-quota.ts index 4b6f4a8c9..495905a1e 100644 --- a/packages/console/src/hooks/use-new-subscription-quota.ts +++ b/packages/console/src/hooks/use-new-subscription-quota.ts @@ -8,7 +8,7 @@ const useNewSubscriptionQuota = (tenantId: string) => { const cloudApi = useCloudApi(); return useSWR( - isCloud && isDevFeaturesEnabled && `/api/tenants/${tenantId}/subscription/quota`, + isCloud && isDevFeaturesEnabled && tenantId && `/api/tenants/${tenantId}/subscription/quota`, async () => cloudApi.get('/api/tenants/:tenantId/subscription/quota', { params: { tenantId }, diff --git a/packages/console/src/hooks/use-new-subscription-scopes-usage.ts b/packages/console/src/hooks/use-new-subscription-scopes-usage.ts index e085456e9..5e39c2005 100644 --- a/packages/console/src/hooks/use-new-subscription-scopes-usage.ts +++ b/packages/console/src/hooks/use-new-subscription-scopes-usage.ts @@ -14,6 +14,7 @@ const useNewSubscriptionScopeUsage = (tenantId: string) => { scopeResourceUsage: useSWR( isCloud && isDevFeaturesEnabled && + tenantId && `/api/tenants/${tenantId}/subscription/usage/${resourceEntityName}/scopes`, async () => cloudApi.get('/api/tenants/:tenantId/subscription/usage/:entityName/scopes', { @@ -24,6 +25,7 @@ const useNewSubscriptionScopeUsage = (tenantId: string) => { scopeRoleUsage: useSWR( isCloud && isDevFeaturesEnabled && + tenantId && `/api/tenants/${tenantId}/subscription/usage/${roleEntityName}/scopes`, async () => cloudApi.get('/api/tenants/:tenantId/subscription/usage/:entityName/scopes', { diff --git a/packages/console/src/hooks/use-new-subscription-usage.ts b/packages/console/src/hooks/use-new-subscription-usage.ts index a878e3f0d..fe25b5cc7 100644 --- a/packages/console/src/hooks/use-new-subscription-usage.ts +++ b/packages/console/src/hooks/use-new-subscription-usage.ts @@ -8,7 +8,7 @@ const useNewSubscriptionUsage = (tenantId: string) => { const cloudApi = useCloudApi(); return useSWR( - isCloud && isDevFeaturesEnabled && `/api/tenants/${tenantId}/subscription/usage`, + isCloud && isDevFeaturesEnabled && tenantId && `/api/tenants/${tenantId}/subscription/usage`, async () => cloudApi.get('/api/tenants/:tenantId/subscription/usage', { params: { tenantId },