Remove parentheses when time ago not present (#6379) [deploy]
This commit is contained in:
parent
501f70bd9f
commit
ec50515810
1 changed files with 6 additions and 6 deletions
|
|
@ -29,6 +29,11 @@ export const Article = ({
|
|||
return <PodcastArticle article={article} />;
|
||||
}
|
||||
|
||||
const timeAgoIndicator = timeAgo({
|
||||
oldTimeInSeconds: article.published_at_int,
|
||||
formatter: x => x,
|
||||
})
|
||||
|
||||
return (
|
||||
<div
|
||||
className="single-article single-article-small-pic"
|
||||
|
|
@ -89,12 +94,7 @@ export const Article = ({
|
|||
)}
|
||||
{article.published_at_int ? (
|
||||
<span className="time-ago-indicator">
|
||||
(
|
||||
{timeAgo({
|
||||
oldTimeInSeconds: article.published_at_int,
|
||||
formatter: x => x,
|
||||
})}
|
||||
)
|
||||
{timeAgoIndicator.length > 0 ? `(${timeAgoIndicator})`: '' }
|
||||
</span>
|
||||
) : null}
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue