Show only relative time if same day on close date

This commit is contained in:
Ian Philips 2022-08-31 08:49:35 -06:00
parent 5df594e46a
commit 37d2be9384

View File

@ -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>
)} )}