mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
fix: hide usage when there is no limit (#10918)
This commit is contained in:
parent
85fa04bc75
commit
79e439ea05
@ -70,6 +70,7 @@ export const BillingInvoiceUsageRow = ({
|
||||
: totalAmount;
|
||||
|
||||
const hasAmount = calculatedAmount && calculatedAmount > 0;
|
||||
const showConsumption = hasValidData;
|
||||
|
||||
const formatIncludedDisplay = () => {
|
||||
if (includedAmount !== undefined && limit !== undefined) {
|
||||
@ -87,10 +88,14 @@ export const BillingInvoiceUsageRow = ({
|
||||
return (
|
||||
<>
|
||||
<StyledDescriptionCell>{description}</StyledDescriptionCell>
|
||||
<StyledCellWithIndicator>
|
||||
<ConsumptionIndicator percentage={percentage || 0} />
|
||||
<div>{formatIncludedDisplay()}</div>
|
||||
</StyledCellWithIndicator>
|
||||
{showConsumption ? (
|
||||
<StyledCellWithIndicator>
|
||||
<ConsumptionIndicator percentage={percentage || 0} />
|
||||
<div>{formatIncludedDisplay()}</div>
|
||||
</StyledCellWithIndicator>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
<div>{overage ? formatLargeNumbers(overage) : ''}</div>
|
||||
{hasAmount ? (
|
||||
<StyledAmountCell>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user