catalog-react: Remove useEntityCompoundName

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-03-04 13:53:49 +01:00
parent 02875d4d56
commit c382100444
5 changed files with 13 additions and 39 deletions
@@ -14,16 +14,13 @@
* limitations under the License.
*/
import {
catalogApiRef,
useEntityCompoundName,
} from '@backstage/plugin-catalog-react';
import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react';
import useAsync from 'react-use/lib/useAsync';
import { useApi } from '@backstage/core-plugin-api';
import { useApi, useRouteRefParams } from '@backstage/core-plugin-api';
export function useCatalogEntity() {
const catalogApi = useApi(catalogApiRef);
const { namespace, name } = useEntityCompoundName();
const { namespace, name } = useRouteRefParams(entityRouteRef);
const {
value: entity,