fix usage billing initial loading state

This commit is contained in:
Kevin Grüneberg committed 2023-06-06 13:50:05 +02:00
1 parent 63b339aaba
commit 6cdbec8e75
2 files changed
+3 -3

No files matched your search

@@ -45,7 +45,7 @@ const BillingBreakdown = ({}: BillingBreakdownProps) => {
const totalUsageFees = usageFees.reduce((a, b) => a + b.amount, 0)
const hasExceededAnyLimits =
!isUsageBillingEnabled &&
isUsageBillingEnabled === false &&
Object.values(usage ?? {})
.map((metric) => {
if (typeof metric !== 'object') return false
@@ -210,9 +210,9 @@ const Usage = () => {
: 'opacity-50'
)}
>
{!usageBillingEnabled && status === USAGE_STATUS.APPROACHING ? (
{usageBillingEnabled === false && status === USAGE_STATUS.APPROACHING ? (
<IconAlertCircle size={15} strokeWidth={2} className="text-amber-900" />
) : !usageBillingEnabled && status === USAGE_STATUS.EXCEEDED ? (
) : usageBillingEnabled === false && status === USAGE_STATUS.EXCEEDED ? (
<IconAlertCircle size={15} strokeWidth={2} className="text-red-900" />
) : null}
<p className="text-sm">{category.name}</p>