bazaar: stop using catalogRouteRef
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-bazaar': patch
|
||||
---
|
||||
|
||||
Switched out internal usage of the `catalogRouteRef` from `@backstage/plugin-catalog-react`.
|
||||
@@ -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 '';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user