Skip to content

Commit

Permalink
fix(date): Fixed issue with invalid dates
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlovicnemanja committed Dec 11, 2024
1 parent ea6a2df commit b95f2bd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions client/components/ContentLists/Manual/ArticleItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ const ArticleItem = ({
</div>
<div className="sd-list-item__row">
<span className="sd-overflow-ellipsis sd-list-item--element-grow">
<time
title={moment(item.published_at).format()}
sd-tooltip={moment(item.published_at).format("HH:mm")}
flow="right"
>
{moment(item.published_at).format("YYYY-MM-DD")}
</time>
{item.published_at &&
<time
title={moment(item.published_at).format()}
sd-tooltip={moment(item.published_at).format("HH:mm")}
flow="right"
>
{moment(item.published_at).format("YYYY-MM-DD")}
</time>
}
{item.updated_at && item.updated_at !== item.published_at ? (
<time
title={moment(item.updated_at).format()}
Expand Down

0 comments on commit b95f2bd

Please sign in to comment.