feat(plugins/home/FeatureDocsCard): use EntityDisplayName rather then data direct

Signed-off-by: secustor <sebastian@poxhofer.at>
This commit is contained in:
secustor
2024-01-25 16:46:18 +01:00
parent dc7ae8b20a
commit 9fe9285b07
2 changed files with 9 additions and 4 deletions
@@ -23,11 +23,16 @@ import {
Progress,
ErrorPanel,
} from '@backstage/core-components';
import { catalogApiRef, CatalogApi } from '@backstage/plugin-catalog-react';
import {
catalogApiRef,
CatalogApi,
EntityDisplayName,
} from '@backstage/plugin-catalog-react';
import { useApi } from '@backstage/core-plugin-api';
import { EntityFilterQuery } from '@backstage/catalog-client';
import { makeStyles, Typography } from '@material-ui/core';
import { stringifyEntityRef } from '@backstage/catalog-model';
/**
* Props customizing the <FeaturedDocsCard/> component.
@@ -116,7 +121,7 @@ export const Content = (props: FeaturedDocsCardProps): JSX.Element => {
}/`
}
>
{d.metadata.title ?? d.metadata.name}
<EntityDisplayName entityRef={stringifyEntityRef(d)} />
</Link>
{d.metadata.description && (
<Typography className={styles.docDescription}>