File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { useOrganizationsQuery } from 'data/organizations/organizations-query'
66import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
77import { useBillingCustomerDataForm } from 'components/interfaces/Organization/BillingSettings/BillingCustomerData/useBillingCustomerDataForm'
88import { useOrganizationCustomerProfileQuery } from 'data/organizations/organization-customer-profile-query'
9+ import { useIsFeatureEnabled } from './useIsFeatureEnabled'
910
1011export type WarningBannerProps = {
1112 type : 'danger' | 'warning' | 'note'
@@ -23,6 +24,11 @@ export function useOrganizationRestrictions() {
2324
2425 const warnings : WarningBannerProps [ ] = [ ]
2526
27+ const billingEnabled = useIsFeatureEnabled ( 'billing:all' )
28+ if ( ! billingEnabled ) {
29+ return { warnings, org }
30+ }
31+
2632 const overdueInvoicesFromOtherOrgs = overdueInvoices ?. filter (
2733 ( invoice ) => invoice . organization_id !== org ?. id
2834 )
You can’t perform that action at this time.
0 commit comments