Skip to content

Commit

Permalink
text for no owner in category
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Dye <[email protected]>
  • Loading branch information
B-T-D committed Sep 24, 2024
1 parent 0eca378 commit dd09eed
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,16 @@ export class OwnerEditor extends React.Component<
const { resourceType } = this.props;
const { itemProps } = this.state;

// check if rendering an owner category that lacks any entries
let isEmptySection = false;
if (section) {

Check failure on line 250 in frontend/amundsen_application/static/js/components/OwnerEditor/index.tsx

View workflow job for this annotation

GitHub Actions / test-unit-frontend (12.x)

Expected blank line before this statement
isEmptySection = Object.keys(itemProps).every(
(key) =>
itemProps[key].additionalOwnerInfo.owner_category.toLowerCase() !==
section.label.toLowerCase()
);
}

return (
<ul className="component-list">
{section ? (
Expand All @@ -253,6 +263,7 @@ export class OwnerEditor extends React.Component<
<InfoButton infoText={section.definition} />
</div>
) : null}
{isEmptySection ? <span className="body-3">None known</span> : null}

{Object.keys(itemProps).map((key) => {
const owner = itemProps[key];
Expand Down

0 comments on commit dd09eed

Please sign in to comment.