invalid annotation logic better reflects component logic

The EntitySplunkOnCallCard gives precedence to a `splunk.com/on-call-team`
annotation. Therefore, the InvalidAnnotation component messaging
should reflect that precedence, even in instances where _both_ supported
annotations are provided and both are deemed invalid.

Signed-off-by: Mike Ball <mikedball@gmail.com>
This commit is contained in:
Mike Ball
2022-02-04 10:04:49 -05:00
parent a957b9fc4d
commit da9d1723f6
@@ -68,14 +68,14 @@ export const InvalidAnnotation = ({
}) => {
let titleSuffix = 'provided annotation';
if (teamName) {
titleSuffix = `"${teamName}" team name`;
}
if (routingKey) {
titleSuffix = `"${routingKey}" routing key`;
}
if (teamName) {
titleSuffix = `"${teamName}" team name`;
}
return (
<Card>
<CardHeader title="Splunk On-Call" />