Update GithubDeploymentsCard.tsx

Signed-off-by: anderoo <anderoojohnson@gmail.com>
This commit is contained in:
Andrew Johnson
2021-05-12 09:41:25 +01:00
committed by anderoo
parent 9d4a6d033a
commit e7e9e93f57
@@ -73,10 +73,8 @@ export const GithubDeploymentsCard = ({
columns?: TableColumn<GithubDeployment>[];
}) => {
const { entity } = useEntity();
const host: string | undefined = [
entity?.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION],
entity?.metadata.annotations?.[LOCATION_ANNOTATION],
].filter(Boolean)[0];
const [host] = [entity?.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION],
entity?.metadata.annotations?.[LOCATION_ANNOTATION]].filter(Boolean);
return !isGithubDeploymentsAvailable(entity) ? (
<MissingAnnotationEmptyState annotation={GITHUB_PROJECT_SLUG_ANNOTATION} />