From 8a85254efe1a0e3f09c06647e3c70c5911c0fee3 Mon Sep 17 00:00:00 2001 From: Isaiah Thiessen Date: Thu, 4 Aug 2022 12:23:57 -0700 Subject: [PATCH] fix: yarn tsc error Signed-off-by: Isaiah Thiessen --- .../components/Problems/ProblemsList/ProblemsList.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx index 17ab1842e9..ef6a2ed173 100644 --- a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx +++ b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx @@ -19,7 +19,7 @@ import { Progress } from '@backstage/core-components'; import Alert from '@material-ui/lab/Alert'; import { useApi } from '@backstage/core-plugin-api'; import { ProblemsTable } from '../ProblemsTable'; -import { dynatraceApiRef } from '../../../api'; +import { dynatraceApiRef, DynatraceProblem } from '../../../api'; import { EmptyState } from '../../EmptyState'; import { InfoCard } from '@backstage/core-components'; @@ -28,8 +28,11 @@ type ProblemsListProps = { dynatraceBaseUrl: string; }; -const cardContents = (problems: Array, dynatraceBaseUrl: string) => { - return problems?.length ? ( +const cardContents = ( + problems: DynatraceProblem[], + dynatraceBaseUrl: string, +) => { + return problems.length ? ( { link: `${dynatraceBaseUrl}/#serviceOverview;id=${dynatraceEntityId}`, }} > - {cardContents(problems, dynatraceBaseUrl)} + {cardContents(problems || [], dynatraceBaseUrl)} ); };