diff --git a/plugins/scaffolder/src/components/TemplateList/TemplateList.tsx b/plugins/scaffolder/src/components/TemplateList/TemplateList.tsx index fb9a73f85e..b23ef16eba 100644 --- a/plugins/scaffolder/src/components/TemplateList/TemplateList.tsx +++ b/plugins/scaffolder/src/components/TemplateList/TemplateList.tsx @@ -15,7 +15,10 @@ */ import React, { ComponentType } from 'react'; -import { TemplateEntityV1beta2 } from '@backstage/catalog-model'; +import { + stringifyEntityRef, + TemplateEntityV1beta2, +} from '@backstage/catalog-model'; import { ItemCardGrid, Progress, @@ -35,6 +38,7 @@ export type TemplateListProps = { export const TemplateList = ({ TemplateCardComponent }: TemplateListProps) => { const { loading, error, entities } = useEntityListProvider(); + const Card = TemplateCardComponent || TemplateCard; return ( <> {loading && } @@ -58,19 +62,12 @@ export const TemplateList = ({ TemplateCardComponent }: TemplateListProps) => { {entities && entities?.length > 0 && - entities.map((template, i) => - TemplateCardComponent ? ( - - ) : ( - - ), - )} + entities.map(template => ( + + ))} );