@@ -31,12 +31,15 @@ export default function CostBreakdownPage() {
3131 [ dateRange , activeOrganization ?. id ]
3232 ) ;
3333
34- const { data : organizationUsage } = trpc . organizations . getUsage . useQuery ( ) ;
3534 const { data : usageData , isLoading : isLoadingUsage } =
3635 trpc . billing . getUsage . useQuery ( usageQueryInput , {
3736 enabled : ! isLoadingOrganizations ,
3837 } ) ;
3938
39+ const { data : organizationUsage } = trpc . organizations . getUsage . useQuery ( ) ;
40+
41+ const isLoading = isLoadingUsage ;
42+
4043 const handleDateRangeChange = ( startDate : string , endDate : string ) => {
4144 setDateRange ( { startDate, endDate } ) ;
4245 } ;
@@ -92,7 +95,7 @@ export default function CostBreakdownPage() {
9295 < div className = "flex-[3]" >
9396 < Suspense fallback = { < Skeleton className = "h-full w-full" /> } >
9497 < ConsumptionChart
95- isLoading = { isLoadingUsage }
98+ isLoading = { isLoading }
9699 onDateRangeChange = { handleDateRangeChange }
97100 overageInfo = { overageInfo }
98101 usageData = { usageData }
@@ -102,7 +105,7 @@ export default function CostBreakdownPage() {
102105 < div className = "flex-[2]" >
103106 < Suspense fallback = { < Skeleton className = "h-full w-full" /> } >
104107 < UsageBreakdownTable
105- isLoading = { isLoadingUsage }
108+ isLoading = { isLoading }
106109 overageInfo = { overageInfo }
107110 usageData = { usageData }
108111 />
0 commit comments