Adjust naming

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-03-08 12:02:29 +01:00
parent a4692715bb
commit 4d2648c6e9
2 changed files with 6 additions and 6 deletions
@@ -81,8 +81,8 @@ export function AboutCard({ variant }: AboutCardProps) {
const viewInSource: IconLinkVerticalProps = {
label: 'View Source',
disabled: !entitySourceLocation,
icon: <ScmIntegrationIcon type={entitySourceLocation?.type} />,
href: entitySourceLocation?.url,
icon: <ScmIntegrationIcon type={entitySourceLocation?.integrationType} />,
href: entitySourceLocation?.locationTargetUrl,
};
const viewInTechDocs: IconLinkVerticalProps = {
label: 'View TechDocs',
@@ -23,8 +23,8 @@ import { ConfigApi } from '@backstage/core';
import { ScmIntegrations } from '@backstage/integration';
export type EntitySourceLocation = {
url: string;
type?: string;
locationTargetUrl: string;
integrationType?: string;
};
export function getEntitySourceLocation(
@@ -44,8 +44,8 @@ export function getEntitySourceLocation(
const integration = scmIntegrations.byUrl(sourceLocationRef.target);
return {
url: sourceLocationRef.target,
type: integration?.type,
locationTargetUrl: sourceLocationRef.target,
integrationType: integration?.type,
};
} catch {
return undefined;