@@ -63,7 +63,7 @@ export function OrgBanner() {
6363 case OrgBannerKind . LimitGrace :
6464 return hideBillingLimitBanner ? null : < LimitGraceBanner /> ;
6565 case OrgBannerKind . NoLimitConfigured :
66- return < NoLimitConfiguredBanner onBillingLimitsPage = { hideBillingLimitBanner } /> ;
66+ return hideBillingLimitBanner ? null : < NoLimitConfiguredBanner /> ;
6767 case OrgBannerKind . Upgrade :
6868 return organization ? < UpgradeBanner /> : null ;
6969 case OrgBannerKind . EnvironmentWarning :
@@ -141,29 +141,25 @@ function LimitGraceBanner() {
141141 ) ;
142142}
143143
144- function NoLimitConfiguredBanner ( { onBillingLimitsPage } : { onBillingLimitsPage : boolean } ) {
144+ function NoLimitConfiguredBanner ( ) {
145145 const organization = useOrganization ( ) ;
146146 const canManageBillingLimits = useCanManageBillingLimits ( ) ;
147147
148- if ( ! canManageBillingLimits ) {
149- return null ;
150- }
151-
152148 return (
153149 < AnimatedOrgBannerBar
154150 show
155151 variant = "warning"
156152 action = {
157- onBillingLimitsPage ? undefined : (
153+ canManageBillingLimits ? (
158154 < LinkButton variant = "tertiary/small" to = { v3BillingLimitsPath ( organization ) } >
159155 Configure billing limit
160156 </ LinkButton >
161- )
157+ ) : undefined
162158 }
163159 >
164- { onBillingLimitsPage
165- ? "Please configure a billing limit to protect your organization from unexpected usage spikes."
166- : "Protect your organization from unexpected usage spikes ." }
160+ { canManageBillingLimits
161+ ? "Protect your organization from unexpected usage spikes."
162+ : "Billing limits are not configured for this organization. Contact an organization administrator to configure them ." }
167163 </ AnimatedOrgBannerBar >
168164 ) ;
169165}
0 commit comments