Skip to content

Commit 4759eed

Browse files
Added changeset: New quota properties
1 parent 0d723ec commit 4759eed

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/api-v4": Added
3+
---
4+
5+
New quota properties ([#13177](https://github.com/linode/manager/pull/13177))

packages/api-v4/src/quotas/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface Quota {
2020
/**
2121
* Sets usage column to be n/a when value is false.
2222
*/
23-
has_usage: boolean;
23+
has_usage?: boolean;
2424

2525
/**
2626
* A unique identifier for the quota.

packages/manager/src/features/Account/Quotas/QuotasTable.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ export const QuotasTable = (props: QuotasTableProps) => {
7474
// This will only fetch for the paginated set
7575
const quotaIdsHavingUsage =
7676
quotas?.data
77-
.filter((quota) => quota.has_usage)
77+
.filter(
78+
(quota) => quota.has_usage === true || quota.has_usage === undefined
79+
)
7880
.map((quota) => quota.quota_id) ?? [];
7981
const quotaUsageQueries = useQueries({
8082
queries: quotaIdsHavingUsage.map((quotaId) =>
@@ -152,7 +154,9 @@ export const QuotasTable = (props: QuotasTableProps) => {
152154
filteredQuotasWithUsage.map((quota, index) => {
153155
return (
154156
<QuotasTableRow
155-
hasUsage={quota.has_usage}
157+
hasUsage={
158+
quota.has_usage === true || quota.has_usage === undefined
159+
}
156160
index={index}
157161
isDataPresent={quota.usage?.usage !== null}
158162
key={quota.quota_id}

0 commit comments

Comments
 (0)