Update DateFilter.tsx

This commit is contained in:
Minseo Lee 2024-08-28 15:17:00 +09:00
parent 4c3f3cbc71
commit e9f657492d

View file

@ -177,9 +177,9 @@ const CustomRange = ({ startDate, endDate, unit, onClick }) => {
<>{intl.formatDate(startDate, { year: 'numeric', month: 'long' })}</> <>{intl.formatDate(startDate, { year: 'numeric', month: 'long' })}</>
) : ( ) : (
<> <>
{intl.formatDate(startDate, { dateStyle: 'medium' })} {isSameDay(startDate, endDate)
{!isSameDay(startDate, endDate) && ? intl.formatDate(startDate, { dateStyle: 'medium' })
`${intl.formatDate(endDate, { dateStyle: 'medium' })}`} : intl.formatDateTimeRange(startDate, endDate)}
</> </>
)} )}
</Text> </Text>