Skip to content

Commit

Permalink
fixup! feat: Implement catalog_incident api
Browse files Browse the repository at this point in the history
  • Loading branch information
aleixhub committed Sep 18, 2024
1 parent 08a1bfd commit d59b716
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions catalog/ui/src/app/Admin/CatalogItemAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const CatalogItemAdmin: React.FC = () => {
const navigate = useNavigate();
const { data: catalogItem } = useSWR<CatalogItem>(apiPaths.CATALOG_ITEM({ namespace, name }), fetcher);
const asset_uuid = catalogItem.metadata.labels['gpte.redhat.com/asset-uuid'];
const { data: catalogItemIncident } = useSWR<CatalogItemIncident>(
const { data: catalogItemIncident, isLoading: isLoadingIncidents } = useSWR<CatalogItemIncident>(
apiPaths.CATALOG_ITEM_LAST_INCIDENT({ namespace, asset_uuid }),
fetcher,
{
Expand Down Expand Up @@ -127,7 +127,7 @@ const CatalogItemAdmin: React.FC = () => {

return (
<PageSection key="body" variant={PageSectionVariants.light}>
{isLoading ? (
{isLoading || isLoadingIncidents ? (
<EmptyState variant="full" className="catalog-item-admin__loading">
<EmptyStateHeader icon={<EmptyStateIcon icon={LoadingIcon} />} />
</EmptyState>
Expand Down

0 comments on commit d59b716

Please sign in to comment.