diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx b/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx index 94d60e9b5f..f050af836c 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx @@ -21,13 +21,14 @@ import { TableColumn, StatusAborted, StatusError, + Link, } from '@backstage/core'; import { GithubDeployment } from '../../api'; import { DateTime } from 'luxon'; -import { Box, Typography, Link } from '@material-ui/core'; +import { Box, Typography } from '@material-ui/core'; -const statusIndicator = (value: string): JSX.Element => { - switch (value) { +export const GithubStateIndicator = ({ state }: { state: string }) => { + switch (state) { case 'PENDING': return ; case 'IN_PROGRESS': @@ -55,7 +56,7 @@ export function createStatusColumn(): TableColumn { title: 'Status', render: (row: GithubDeployment): JSX.Element => ( - {statusIndicator(row.state)} + {row.state} ), @@ -66,7 +67,7 @@ export function createCommitColumn(): TableColumn { return { title: 'Commit', render: (row: GithubDeployment): JSX.Element => ( - + {row.commit.abbreviatedOid} ),