Show relative time on large post too

This commit is contained in:
Lim Chee Aun 2024-10-28 18:49:50 +08:00
parent 058cf05805
commit f10d5457ae

View file

@ -2267,6 +2267,19 @@ function Status({
/> */}
<span>{_(visibilityText[visibility])}</span> &bull;{' '}
<a href={url} target="_blank" rel="noopener noreferrer">
{
// within a day
new Date().getTime() - createdAtDate.getTime() <
86400000 && (
<>
<RelativeTime
datetime={createdAtDate}
format="micro"
/>{' '}
{' '}
</>
)
}
<time
class="created"
datetime={createdAtDate.toISOString()}