renamed function to customTitle

Signed-off-by: Aurelio Saraiva <aureliosaraiva@gmail.com>
This commit is contained in:
Aurelio Saraiva
2021-08-18 19:34:16 -03:00
parent ce02607532
commit 60169a761d
@@ -17,9 +17,10 @@
import React from 'react';
import { Link, SubvalueCell, TableColumn } from '@backstage/core-components';
import { EntityRefLinks } from '@backstage/plugin-catalog-react';
import { Entity } from '@backstage/catalog-model';
import { DocsTableRow } from './types';
function formatTitle(entity): String {
function customTitle(entity: Entity): String {
return entity.metadata.title || entity.metadata.name;
}
@@ -30,7 +31,7 @@ export function createNameColumn(): TableColumn<DocsTableRow> {
highlight: true,
render: (row: DocsTableRow) => (
<SubvalueCell
value={<Link to={row.resolved.docsUrl}>{formatTitle(row.entity)}</Link>}
value={<Link to={row.resolved.docsUrl}>{customTitle(row.entity)}</Link>}
subvalue={row.entity.metadata.description}
/>
),