@@ -4,7 +4,7 @@ import { MonthlyUsageCard } from './components/monthly-usage-card';
44import { Button } from '@/components/v1/ui/button' ;
55import { Spinner } from '@/components/v1/ui/loading' ;
66import { Separator } from '@/components/v1/ui/separator' ;
7- import { useTenantDetails } from '@/hooks/use-tenant' ;
7+ import { useCurrentTenantId , useTenantDetails } from '@/hooks/use-tenant' ;
88import { cloudApi } from '@/lib/api/api' ;
99import { queries } from '@/lib/api/queries' ;
1010import { managedCompute } from '@/lib/can/features/managed-compute' ;
@@ -17,19 +17,18 @@ import { Link } from '@tanstack/react-router';
1717import { useEffect , useState } from 'react' ;
1818
1919export default function ManagedWorkers ( ) {
20- const { tenant, tenantId, billing, can } = useTenantDetails ( ) ;
20+ const { tenant, billing, can } = useTenantDetails ( ) ;
21+ const { tenantId } = useCurrentTenantId ( ) ;
2122
2223 const [ portalLoading , setPortalLoading ] = useState ( false ) ;
2324 const [ showUpgradeModal , setShowUpgradeModal ] = useState ( false ) ;
2425
2526 const computeCostQuery = useQuery ( {
26- ...queries . cloud . getComputeCost ( tenantId ?? '' ) ,
27- enabled : ! ! tenantId ,
27+ ...queries . cloud . getComputeCost ( tenantId ) ,
2828 } ) ;
2929
3030 const listManagedWorkersQuery = useQuery ( {
31- ...queries . cloud . listManagedWorkers ( tenantId ?? '' ) ,
32- enabled : ! ! tenantId ,
31+ ...queries . cloud . listManagedWorkers ( tenantId ) ,
3332 } ) ;
3433
3534 // Check if the user can create more worker pools
0 commit comments