Skip to content

Commit

Permalink
change(card): always show date div in meta section even if it's empty
Browse files Browse the repository at this point in the history
- due to the spacing and alignment that we want to keep where the title is on the
  same line we need to have the upper section visible even if we don't add any
  date or publication type
  • Loading branch information
ichim-david committed Nov 18, 2022
1 parent 8ef6bc9 commit f16c7af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/UniversalCard/fragments/CardMeta.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const CardMeta = (props) => {
{showMeta && (
<span className="text-left">{head_title || item['Type']}</span>
)}
{showDate && (
<span className="text-right date">
{formatDate({

<span className="text-right date">
{showDate &&
formatDate({
date: EffectiveDate,
format: {
year: 'numeric',
Expand All @@ -29,8 +30,7 @@ const CardMeta = (props) => {
},
locale: locale,
})}
</span>
)}
</span>
</UiCard.Meta>
);
};
Expand Down

0 comments on commit f16c7af

Please sign in to comment.