File tree 2 files changed +3
-3
lines changed
npm-packages/dashboard/src
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -168,10 +168,10 @@ export function useListPlans(teamId?: number) {
168
168
} ;
169
169
}
170
170
171
- export function useGetCurrentSpend ( teamId : number ) {
171
+ export function useGetCurrentSpend ( teamId : number | null ) {
172
172
const { data, isLoading } = useBBQuery ( {
173
173
path : "/teams/{team_id}/get_current_spend" ,
174
- pathParams : { team_id : teamId . toString ( ) } ,
174
+ pathParams : { team_id : teamId ? .toString ( ) ?? "" } ,
175
175
swrOptions : {
176
176
refreshInterval : 1000 * 60 ,
177
177
} ,
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ function SpendingLimitsSectionContainer({
150
150
} ) {
151
151
const submitSpendingLimits = useSubmitSpendingLimits ( team ) ;
152
152
153
- const currentSpend = useGetCurrentSpend ( team . id ) ;
153
+ const currentSpend = useGetCurrentSpend ( hasAdminPermissions ? team . id : null ) ;
154
154
const { spendingLimits } = useGetSpendingLimits ( team . id ) ;
155
155
156
156
return (
You can’t perform that action at this time.
0 commit comments