Skip to content

Commit

Permalink
fix: remove empty space for empyt health section
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskari committed Jul 9, 2024
1 parent 4fa125a commit f9f4ab8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Extensibility/ExtensibilityDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const ExtensibilityDetailsCore = ({
: []
}
customHealthCards={
Array.isArray(health)
Array.isArray(health) && health?.length > 0
? [
(resource, i) => (
<Widget
Expand Down
8 changes: 4 additions & 4 deletions src/shared/components/ResourceDetails/ResourceDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ResourceDetails.propTypes = {
showYamlTab: PropTypes.bool,
layoutCloseCreateUrl: PropTypes.string,
layoutNumber: PropTypes.string,
customHealthCards: PropTypes.node,
customHealthCards: PropTypes.arrayOf(PropTypes.func),
showHealthCardsTitle: PropTypes.bool,
};

Expand Down Expand Up @@ -394,9 +394,9 @@ function Resource({
/>
);

const customOverviewCard = (customHealthCards || []).map(healthCard =>
healthCard(resource),
);
const customOverviewCard = (
customHealthCards || []
).map((healthCard, index) => healthCard(resource, index));

return (
<ResourceDetailContext.Provider value={true}>
Expand Down

0 comments on commit f9f4ab8

Please sign in to comment.