diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx
index 9f66fffd7a..bb8950041a 100644
--- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx
+++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx
@@ -54,8 +54,10 @@ export function EntityRefLinks<
if (fetchEntities) {
return (
);
}
diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx
index 5dbe429496..6b6ead7872 100644
--- a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx
+++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx
@@ -13,7 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
+import {
+ Entity,
+ CompoundEntityRef,
+ parseEntityRef,
+} from '@backstage/catalog-model';
import React from 'react';
import { EntityRefLink } from './EntityRefLink';
import { ErrorPanel, LinkProps, Progress } from '@backstage/core-components';
@@ -31,7 +35,6 @@ export type FetchedEntityRefLinksProps<
> = {
defaultKind?: string;
entityRefs: TRef[];
- fetchEntities: true;
getTitle?(entity: Entity): string | undefined;
} & Omit;
@@ -44,60 +47,35 @@ export type FetchedEntityRefLinksProps<
export function FetchedEntityRefLinks<
TRef extends string | CompoundEntityRef | Entity,
>(props: FetchedEntityRefLinksProps) {
- const { entityRefs, defaultKind, fetchEntities, getTitle, ...linkProps } =
- props;
+ const { entityRefs, defaultKind, getTitle, ...linkProps } = props;
const catalogApi = useApi(catalogApiRef);
const {
- value: refToEntity = new Map(),
+ value: entities = new Array(),
loading,
error,
- } = useAsync(
- () =>
- entityRefs.reduce(
- async (promisedAcc: Promise