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
@@ -16,7 +16,6 @@
import React, { useEffect } from 'react';
import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns';
import { WorkflowRunsTable } from '../WorkflowRunsTable';
import { Entity } from '@backstage/catalog-model';
import { useEntity } from '@backstage/plugin-catalog-react';
import { WorkflowRunStatus } from '../WorkflowRunStatus';
import { Theme, makeStyles, LinearProgress } from '@material-ui/core';
@@ -76,8 +75,6 @@ const WidgetContent = ({
export const LatestWorkflowRunCard = ({
branch = 'master',
}: {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
branch: string;
}) => {
const { entity } = useEntity();
@@ -109,8 +106,6 @@ export const LatestWorkflowRunCard = ({
export const LatestWorkflowsForBranchCard = ({
branch = 'master',
}: {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
branch: string;
}) => {
const { entity } = useEntity();
+1 -6
View File
@@ -26,12 +26,7 @@ import { MissingAnnotationEmptyState } from '@backstage/core-components';
export const isCloudbuildAvailable = (entity: Entity) =>
Boolean(entity.metadata.annotations?.[CLOUDBUILD_ANNOTATION]);
type Props = {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
};
export const Router = (_props: Props) => {
export const Router = () => {
const { entity } = useEntity();
if (!isCloudbuildAvailable(entity)) {