Show only relative time if same day on close date
This commit is contained in:
parent
5df594e46a
commit
37d2be9384
|
@ -429,10 +429,13 @@ function EditableCloseDate(props: {
|
||||||
className={isCreator ? 'cursor-pointer' : ''}
|
className={isCreator ? 'cursor-pointer' : ''}
|
||||||
onClick={() => isCreator && setIsEditingCloseTime(true)}
|
onClick={() => isCreator && setIsEditingCloseTime(true)}
|
||||||
>
|
>
|
||||||
{isSameYear
|
{isSameDay ? (
|
||||||
? dayJsCloseTime.format('MMM D')
|
<span className={'capitalize'}> {fromNow(closeTime)}</span>
|
||||||
: dayJsCloseTime.format('MMM D, YYYY')}
|
) : isSameYear ? (
|
||||||
{isSameDay && <> ({fromNow(closeTime)})</>}
|
dayJsCloseTime.format('MMM D')
|
||||||
|
) : (
|
||||||
|
dayJsCloseTime.format('MMM D, YYYY')
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</DateTimeTooltip>
|
</DateTimeTooltip>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user