properly render <Missing* /> components
Corrects logic ensuring `<MissingAnnotation />` and `<MissingEventsRestEndpoint />` render correctly. Previously, neither component would render from within the `<Content />` component. Signed-off-by: Mike Ball <mikedball@gmail.com>
This commit is contained in:
@@ -152,6 +152,14 @@ export const EntitySplunkOnCallCard = () => {
|
||||
return { usersHashMap, foundTeams };
|
||||
});
|
||||
|
||||
if (!teamAnnotation && !routingKeyAnnotation) {
|
||||
return <MissingAnnotation />;
|
||||
}
|
||||
|
||||
if (!eventsRestEndpoint) {
|
||||
return <MissingEventsRestEndpoint />;
|
||||
}
|
||||
|
||||
if (error instanceof UnauthorizedError) {
|
||||
return <MissingApiKeyOrApiIdError />;
|
||||
}
|
||||
@@ -175,10 +183,6 @@ export const EntitySplunkOnCallCard = () => {
|
||||
team: Team | undefined;
|
||||
usersHashMap: any | undefined;
|
||||
}) => {
|
||||
if (!teamAnnotation && !routingKeyAnnotation) {
|
||||
return <MissingAnnotation />;
|
||||
}
|
||||
|
||||
if (!team) {
|
||||
return (
|
||||
<InvalidTeamAnnotation
|
||||
@@ -187,10 +191,6 @@ export const EntitySplunkOnCallCard = () => {
|
||||
);
|
||||
}
|
||||
|
||||
if (!eventsRestEndpoint) {
|
||||
return <MissingEventsRestEndpoint />;
|
||||
}
|
||||
|
||||
const teamName = team.name || '';
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user