rewrite using isToday helper

This commit is contained in:
Artem Baskal
2020-01-17 17:40:47 +03:00
parent a3020275a2
commit af7b9523b5
2 changed files with 6 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ import { HashLink as Link } from 'react-router-hash-link';
import {
formatTime,
formatDateTime,
formatTodayDate,
isToday,
} from '../../helpers/helpers';
import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
import { getTrackerData } from '../../helpers/trackers/trackers';
@@ -118,8 +118,7 @@ class Logs extends Component {
getTimeCell = ({ value }) => (
<div className="logs__row">
<span className="logs__text" title={formatDateTime(value)}>
{formatTodayDate(value) === formatTodayDate(Date.now())
? formatTime(value) : formatDateTime(value)}
{isToday(value) ? formatTime(value) : formatDateTime(value)}
</span>
</div>
);