From 52bb1807db368179feb0dee4b680e332070f918f Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Thu, 3 Feb 2022 16:45:42 -0500 Subject: [PATCH] properly render components Corrects logic ensuring `` and `` render correctly. Previously, neither component would render from within the `` component. Signed-off-by: Mike Ball --- .../src/components/EntitySplunkOnCallCard.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx index 8dbbf6e848..5f9db7e415 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx @@ -152,6 +152,14 @@ export const EntitySplunkOnCallCard = () => { return { usersHashMap, foundTeams }; }); + if (!teamAnnotation && !routingKeyAnnotation) { + return ; + } + + if (!eventsRestEndpoint) { + return ; + } + if (error instanceof UnauthorizedError) { return ; } @@ -175,10 +183,6 @@ export const EntitySplunkOnCallCard = () => { team: Team | undefined; usersHashMap: any | undefined; }) => { - if (!teamAnnotation && !routingKeyAnnotation) { - return ; - } - if (!team) { return ( { ); } - if (!eventsRestEndpoint) { - return ; - } - const teamName = team.name || ''; return (