Apply suggestions from code review
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
d08383d759
commit
63e07652a0
@ -20,9 +20,8 @@ export default function Component({ service }) {
|
|||||||
if (status === "apps") {
|
if (status === "apps") {
|
||||||
return { status, count: appsData?.items?.length };
|
return { status, count: appsData?.items?.length };
|
||||||
}
|
}
|
||||||
const apiStatus = status.charAt(0).toUpperCase() + status.slice(1);
|
|
||||||
const count = appsData?.items?.filter(
|
const count = appsData?.items?.filter(
|
||||||
(item) => item.status?.sync?.status === apiStatus || item.status?.health?.status === apiStatus,
|
(item) => item.status?.sync?.status.toLowerCase() === status.toLowerCase() || item.status?.health?.status.toLowerCase() === status.toLowerCase(),
|
||||||
).length;
|
).length;
|
||||||
return { status, count };
|
return { status, count };
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user