diff --git a/.changeset/shaggy-days-film.md b/.changeset/shaggy-days-film.md new file mode 100644 index 0000000000..ae9c47c318 --- /dev/null +++ b/.changeset/shaggy-days-film.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-bazaar': patch +--- + +Switched out internal usage of the `catalogRouteRef` from `@backstage/plugin-catalog-react`. diff --git a/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx b/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx index 3f9da083bb..5624f40765 100644 --- a/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx +++ b/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx @@ -44,10 +44,7 @@ import { Member, BazaarProject } from '../../types'; import { bazaarApiRef } from '../../api'; import { Alert } from '@material-ui/lab'; import useAsyncFn from 'react-use/lib/useAsyncFn'; -import { - catalogApiRef, - catalogRouteRef, -} from '@backstage/plugin-catalog-react'; +import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react'; import { parseEntityName, @@ -85,7 +82,7 @@ export const HomePageBazaarInfoCard = ({ initEntity, }: Props) => { const classes = useStyles(); - const catalogLink = useRouteRef(catalogRouteRef); + const entityLink = useRouteRef(entityRouteRef); const bazaarApi = useApi(bazaarApiRef); const identity = useApi(identityApiRef); const catalogApi = useApi(catalogApiRef); @@ -156,7 +153,7 @@ export const HomePageBazaarInfoCard = ({ const { name, kind, namespace } = parseEntityName( bazaarProject.value.entityRef, ); - return `${catalogLink()}/${namespace}/${kind}/${name}`; + return entityLink({ kind, namespace, name }); } return ''; };