Skip to content

Commit

Permalink
fix(QualificationListItemDate): Expiration annotation was shown not o…
Browse files Browse the repository at this point in the history
…nly on expiration date
  • Loading branch information
JF-Cozy committed May 24, 2023
1 parent 112bec8 commit d29e263
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion react/Viewer/Panel/QualificationListItemDate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const QualificationListItemDate = forwardRef(
const formattedDate = value
? formatDate({ f, lang, date: value })
: t('Viewer.panel.qualification.noInfo')
const isExpirationDate = name === 'expirationDate'

return (
<ListItem className={'u-pl-2 u-pr-3'}>
Expand All @@ -33,7 +34,7 @@ const QualificationListItemDate = forwardRef(
<Typography component="span" variant="inherit">
{formattedDate}
</Typography>
{(isExpired(file) || isExpiringSoon(file)) && (
{isExpirationDate && (isExpired(file) || isExpiringSoon(file)) && (
<>
<Typography component="span" variant="inherit">
{' · '}
Expand Down

0 comments on commit d29e263

Please sign in to comment.