Skip to content

Commit

Permalink
332 Hides the metadata section when no data is available
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardovdheijden committed Mar 26, 2024
1 parent 3cfd9f5 commit aa6e727
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export const WfoSubscriptionGeneral = ({
];
};

const hasMetadata = Object.entries(subscriptionDetail.metadata).length > 0;

return (
<EuiFlexGrid direction={'row'}>
<>
Expand All @@ -135,12 +137,14 @@ export const WfoSubscriptionGeneral = ({
keyValues={getSubscriptionDetailBlockData()}
/>
</EuiFlexItem>
<EuiFlexItem>
<SubscriptionKeyValueBlock
title={t('metadata')}
keyValues={getMetadataBlockData()}
/>
</EuiFlexItem>
{hasMetadata && (
<EuiFlexItem>
<SubscriptionKeyValueBlock
title={t('metadata')}
keyValues={getMetadataBlockData()}
/>
</EuiFlexItem>
)}
<EuiFlexItem>
<SubscriptionKeyValueBlock
title={t('blockTitleFixedInputs')}
Expand Down

0 comments on commit aa6e727

Please sign in to comment.