chore: putting the deprecations back and fixing last occurence
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -78,10 +78,10 @@ export class RouteRefImpl<Params extends AnyParams>
|
||||
}
|
||||
}
|
||||
|
||||
// /** @deprecated use `useRouteRef` instead */
|
||||
// get path() {
|
||||
// return thuis
|
||||
// }
|
||||
/** @deprecated use `useRouteRef` instead */
|
||||
get path() {
|
||||
return this;
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return this.config.icon;
|
||||
|
||||
@@ -88,7 +88,7 @@ export type RouteRef<Params extends AnyParams = any> = {
|
||||
|
||||
// TODO(Rugvip): Remove all of these once plugins don't rely on the path
|
||||
/** @deprecated paths are no longer accessed directly from RouteRefs, use useRouteRef instead */
|
||||
// path: string;
|
||||
path: string;
|
||||
/** @deprecated icons are no longer accessed via RouteRefs */
|
||||
icon?: OldIconComponent;
|
||||
/** @deprecated titles are no longer accessed via RouteRefs */
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import { generatePath } from 'react-router';
|
||||
import { ResponseError } from '@backstage/errors';
|
||||
import { Entity, ENTITY_DEFAULT_NAMESPACE } from '@backstage/catalog-model';
|
||||
import { entityRoute } from '@backstage/plugin-catalog-react';
|
||||
import { BadgesApi, BadgeSpec } from './types';
|
||||
import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
|
||||
|
||||
@@ -53,7 +52,7 @@ export class BadgesClient implements BadgesApi {
|
||||
|
||||
private async getEntityBadgeSpecsUrl(entity: Entity): Promise<string> {
|
||||
const routeParams = this.getEntityRouteParams(entity);
|
||||
const path = generatePath(entityRoute.path, routeParams);
|
||||
const path = generatePath(`:kind/:namespace/:name`, routeParams);
|
||||
return `${await this.discoveryApi.getBaseUrl(
|
||||
'badges',
|
||||
)}/entity/${path}/badge-specs`;
|
||||
|
||||
Reference in New Issue
Block a user