diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx
index 0f32c925f0..54784b1f4e 100644
--- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx
+++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx
@@ -33,7 +33,7 @@ import { MissingApiKeyOrApiIdError } from './Errors';
import { EscalationPolicy } from './Escalation';
import { Incidents } from './Incident';
import { TriggerDialog } from './TriggerDialog';
-import { RoutingKey, Team, User } from './types';
+import { RoutingKey, User } from './types';
import { configApiRef, useApi } from '@backstage/core-plugin-api';
import {
@@ -99,48 +99,6 @@ export const MissingEventsRestEndpoint = () => (
);
-const Content = ({
- team,
- routingKey,
- usersHashMap,
- readOnly,
- showDialog,
- refreshIncidents,
- actions,
-}: {
- team: Team | undefined;
- routingKey: RoutingKey | undefined;
- usersHashMap: any;
- readOnly: boolean;
- showDialog: boolean;
- refreshIncidents: boolean;
- actions: {
- handleDialog: () => void;
- handleRefresh: () => void;
- };
-}) => {
- const teamName = team?.name ?? '';
-
- return (
- <>
-
- {usersHashMap && team && (
-
- )}
-
- >
- );
-};
-
/** @public */
export const isSplunkOnCallAvailable = (entity: Entity) =>
Boolean(entity.metadata.annotations?.[SPLUNK_ON_CALL_TEAM]) ||
@@ -278,37 +236,45 @@ export const EntitySplunkOnCallCard = (props: EntitySplunkOnCallCardProps) => {
return (
<>
- {teams.map((team, i) => (
-
-
- Team: {team && team.name ? team.name : ''}
- ,
- ,
- ]}
- />
-
-
- {
+ const teamName = team?.name ?? '';
+ return (
+
+
+ Team: {team && team.name ? team.name : ''}
+ ,
+ ,
+ ]}
/>
-
-
- ))}
+
+
+
+ {entityData?.usersHashMap && team && (
+
+ )}
+
+
+
+ );
+ })}
>
);
};