refactor(luxon): Plugin CloudBuild - Swapped over from using moment to luxon
Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"moment": "^2.27.0",
|
||||
"luxon": "^2.0.2",
|
||||
"qs": "^6.9.4",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
|
||||
@@ -24,7 +24,7 @@ import SyncIcon from '@material-ui/icons/Sync';
|
||||
import { useProjectName } from '../useProjectName';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { buildRouteRef } from '../../routes';
|
||||
import moment from 'moment';
|
||||
import { DateTime } from 'luxon';
|
||||
import { Table, TableColumn } from '@backstage/core-components';
|
||||
|
||||
const generatedColumns: TableColumn[] = [
|
||||
@@ -84,7 +84,11 @@ const generatedColumns: TableColumn[] = [
|
||||
title: 'Created',
|
||||
render: (row: Partial<WorkflowRun>) => (
|
||||
<Typography data-testid="cell-created" variant="body2" noWrap>
|
||||
<p>{moment(row.createTime).format('DD-MM-YYYY hh:mm:ss')}</p>
|
||||
<p>
|
||||
{DateTime.fromISO(row.createTime ?? DateTime.now().toISO()).toFormat(
|
||||
'dd-MM-yyyy hh:mm:ss',
|
||||
)}
|
||||
</p>
|
||||
</Typography>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user