removed deprecated entity props

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-02-18 13:09:56 +01:00
parent 10a0a8046b
commit 2262fe19c9
41 changed files with 61 additions and 186 deletions
+3 -6
View File
@@ -12,18 +12,15 @@ import { Entity } from '@backstage/catalog-model';
import { IdentityApi } from '@backstage/core-plugin-api';
import { RouteRef } from '@backstage/core-plugin-api';
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "EntityPageRollbar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityPageRollbar: (_props: Props) => JSX.Element;
export const EntityPageRollbar: () => JSX.Element;
// Warning: (ae-missing-release-tag) "EntityRollbarContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityRollbarContent: (_props: {
entity?: Entity | undefined;
}) => JSX.Element;
export const EntityRollbarContent: (_props: {}) => JSX.Element;
// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -103,5 +100,5 @@ export { rollbarPlugin };
// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Router: (_props: Props_2) => JSX.Element;
export const Router: (_props: Props) => JSX.Element;
```
@@ -14,17 +14,11 @@
* limitations under the License.
*/
import { Entity } from '@backstage/catalog-model';
import { useEntity } from '@backstage/plugin-catalog-react';
import React from 'react';
import { RollbarProject } from '../RollbarProject/RollbarProject';
type Props = {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
};
export const EntityPageRollbar = (_props: Props) => {
export const EntityPageRollbar = () => {
const { entity } = useEntity();
return <RollbarProject entity={entity} />;
+2 -5
View File
@@ -25,10 +25,7 @@ import { MissingAnnotationEmptyState } from '@backstage/core-components';
export const isPluginApplicableToEntity = (entity: Entity) =>
Boolean(entity.metadata.annotations?.[ROLLBAR_ANNOTATION]);
type Props = {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
};
type Props = {};
export const Router = (_props: Props) => {
const { entity } = useEntity();
@@ -39,7 +36,7 @@ export const Router = (_props: Props) => {
return (
<Routes>
<Route path="/" element={<EntityPageRollbar entity={entity} />} />
<Route path="/" element={<EntityPageRollbar />} />
</Routes>
);
};