Remove React Virtualized from <Timeline>
This commit is contained in:
parent
1eafe79905
commit
0c31ad25ef
40 changed files with 798 additions and 2512 deletions
|
@ -67,7 +67,7 @@ export function formatDateTimeShort(
|
|||
const diff = now - timestamp;
|
||||
|
||||
if (diff < HOUR || isToday(timestamp)) {
|
||||
return formatTime(i18n, rawTimestamp);
|
||||
return formatTime(i18n, rawTimestamp, now);
|
||||
}
|
||||
|
||||
const m = moment(timestamp);
|
||||
|
@ -102,10 +102,11 @@ export function formatDateTimeLong(
|
|||
|
||||
export function formatTime(
|
||||
i18n: LocalizerType,
|
||||
rawTimestamp: RawTimestamp
|
||||
rawTimestamp: RawTimestamp,
|
||||
now: RawTimestamp
|
||||
): string {
|
||||
const timestamp = rawTimestamp.valueOf();
|
||||
const diff = Date.now() - timestamp;
|
||||
const diff = now.valueOf() - timestamp;
|
||||
|
||||
if (diff < MINUTE) {
|
||||
return i18n('justNow');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue