|
9 | 9 | useOptionalOrganization, |
10 | 10 | useOrganization, |
11 | 11 | useBillingLimit, |
12 | | - useCanManageBilling, |
| 12 | + useCanManageBillingLimits, |
13 | 13 | } from "~/hooks/useOrganizations"; |
14 | 14 | import { useOptionalProject, useProject } from "~/hooks/useProject"; |
15 | 15 | import { useShowSelfServe } from "~/hooks/useShowSelfServe"; |
@@ -80,8 +80,8 @@ export function OrgBanner() { |
80 | 80 | function LimitRejectedBanner() { |
81 | 81 | const organization = useOrganization(); |
82 | 82 | const showSelfServe = useShowSelfServe(); |
83 | | - const canManageBilling = useCanManageBilling(); |
84 | | - const canResolve = showSelfServe && canManageBilling; |
| 83 | + const canManageBillingLimits = useCanManageBillingLimits(); |
| 84 | + const canResolve = showSelfServe && canManageBillingLimits; |
85 | 85 |
|
86 | 86 | return ( |
87 | 87 | <AnimatedOrgBannerBar |
@@ -110,8 +110,8 @@ function LimitGraceBanner() { |
110 | 110 | const organization = useOrganization(); |
111 | 111 | const billingLimit = useBillingLimit(); |
112 | 112 | const showSelfServe = useShowSelfServe(); |
113 | | - const canManageBilling = useCanManageBilling(); |
114 | | - const canResolve = showSelfServe && canManageBilling; |
| 113 | + const canManageBillingLimits = useCanManageBillingLimits(); |
| 114 | + const canResolve = showSelfServe && canManageBillingLimits; |
115 | 115 |
|
116 | 116 | const graceEndsAt = |
117 | 117 | billingLimit?.isConfigured && billingLimit.limitState.status === "grace" |
@@ -143,21 +143,21 @@ function LimitGraceBanner() { |
143 | 143 |
|
144 | 144 | function NoLimitConfiguredBanner() { |
145 | 145 | const organization = useOrganization(); |
146 | | - const canManageBilling = useCanManageBilling(); |
| 146 | + const canManageBillingLimits = useCanManageBillingLimits(); |
147 | 147 |
|
148 | 148 | return ( |
149 | 149 | <AnimatedOrgBannerBar |
150 | 150 | show |
151 | 151 | variant="warning" |
152 | 152 | action={ |
153 | | - canManageBilling ? ( |
| 153 | + canManageBillingLimits ? ( |
154 | 154 | <LinkButton variant="tertiary/small" to={v3BillingLimitsPath(organization)}> |
155 | 155 | Configure billing limit |
156 | 156 | </LinkButton> |
157 | 157 | ) : undefined |
158 | 158 | } |
159 | 159 | > |
160 | | - {canManageBilling |
| 160 | + {canManageBillingLimits |
161 | 161 | ? "Protect your organization from unexpected usage spikes." |
162 | 162 | : "Billing limits are not configured for this organization. Contact an organization administrator to configure them."} |
163 | 163 | </AnimatedOrgBannerBar> |
|
0 commit comments