File tree 2 files changed +4
-3
lines changed
components/settings/platform/hooks
lib/hooks/settings/platform/oauth-clients
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import { useCheckTeamBilling } from "@calcom/web/lib/hooks/settings/platform/oau
4
4
export const useGetUserAttributes = ( ) => {
5
5
const { data : user , isLoading : isUserLoading } = useMeQuery ( ) ;
6
6
const { data : userBillingData , isFetching : isUserBillingDataLoading } = useCheckTeamBilling (
7
- user ?. organizationId
7
+ user ?. organizationId ,
8
+ user ?. organization . isPlatform
8
9
) ;
9
10
const isPlatformUser = user ?. organization . isPlatform ;
10
11
const isPaidUser = userBillingData ?. valid ;
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ export const useDeleteOAuthClient = (
119
119
return mutation ;
120
120
} ;
121
121
122
- export const useCheckTeamBilling = ( teamId ?: number | null ) => {
122
+ export const useCheckTeamBilling = ( teamId ?: number | null , isPlatformTeam ?: boolean | null ) => {
123
123
const QUERY_KEY = "check-team-billing" ;
124
124
const isTeamBilledAlready = useQuery ( {
125
125
queryKey : [ QUERY_KEY , teamId ] ,
@@ -132,7 +132,7 @@ export const useCheckTeamBilling = (teamId?: number | null) => {
132
132
133
133
return data . data ;
134
134
} ,
135
- enabled : ! ! teamId ,
135
+ enabled : ! ! teamId && ! ! isPlatformTeam ,
136
136
} ) ;
137
137
138
138
return isTeamBilledAlready ;
You can’t perform that action at this time.
0 commit comments