Replace timeago.js in favor of luxon in Sentry plugin
Signed-off-by: Vitor Capretz <capretzvitor@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import React from 'react';
|
||||
import { Table, TableColumn } from '@backstage/core';
|
||||
import { SentryIssue } from '../../api';
|
||||
import { format } from 'timeago.js';
|
||||
import { DateTime } from 'luxon';
|
||||
import { ErrorCell } from '../ErrorCell/ErrorCell';
|
||||
import { ErrorGraph } from '../ErrorGraph/ErrorGraph';
|
||||
|
||||
@@ -35,7 +35,8 @@ const columns: TableColumn[] = [
|
||||
field: 'firstSeen',
|
||||
render: data => {
|
||||
const { firstSeen } = data as SentryIssue;
|
||||
return format(firstSeen);
|
||||
|
||||
return DateTime.fromISO(firstSeen).toRelative({ locale: 'en' });
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -43,7 +44,7 @@ const columns: TableColumn[] = [
|
||||
field: 'lastSeen',
|
||||
render: data => {
|
||||
const { lastSeen } = data as SentryIssue;
|
||||
return format(lastSeen);
|
||||
return DateTime.fromISO(lastSeen).toRelative({ locale: 'en' });
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user