diff --git a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx
index 840ac35b26..36946f7875 100644
--- a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx
+++ b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx
@@ -35,12 +35,12 @@ const RadarDescription = (props: Props): JSX.Element => {
const handleClick = () => {
onClose();
- if (url) {
- if (urlTarget) {
- window.open(url, urlTarget);
- } else {
- window.location.href = url;
- }
+ if (urlTarget) {
+ console.log('with target' + urlTarget)
+ window.open(url, urlTarget);
+ } else {
+ console.log('no target' + urlTarget)
+ window.location.href = url;
}
};
@@ -52,13 +52,12 @@ const RadarDescription = (props: Props): JSX.Element => {
- {url && (
+ {(url && url !== '#') && (
}
- href={url}
>
LEARN MORE
diff --git a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx
index 26efc4ae50..d1f8f3b555 100644
--- a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx
+++ b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx
@@ -110,6 +110,7 @@ const RadarEntry = (props: Props): JSX.Element => {
title={title ? title : 'no title'}
description={description ? description : 'no description'}
url={url}
+ urlTarget={urlTarget}
/>
)}
{description ? (
diff --git a/plugins/tech-radar/src/components/RadarPlot/RadarPlot.tsx b/plugins/tech-radar/src/components/RadarPlot/RadarPlot.tsx
index d9788be887..6ba34e79ae 100644
--- a/plugins/tech-radar/src/components/RadarPlot/RadarPlot.tsx
+++ b/plugins/tech-radar/src/components/RadarPlot/RadarPlot.tsx
@@ -73,6 +73,7 @@ const RadarPlot = (props: Props): JSX.Element => {
color={entry.color || ''}
value={(entry?.index || 0) + 1}
url={entry.url}
+ urlTarget={entry.urlTarget}
description={entry.description}
moved={entry.moved}
title={entry.title}
diff --git a/plugins/tech-radar/src/sample.ts b/plugins/tech-radar/src/sample.ts
index ba3fc632ab..bb875e53c7 100644
--- a/plugins/tech-radar/src/sample.ts
+++ b/plugins/tech-radar/src/sample.ts
@@ -107,14 +107,14 @@ entries.push({
{
moved: 0,
ringId: 'use',
- date: new Date('2020-08-06'),
+ date: new Date('2020-08-06')
},
],
url: '#',
key: 'code-reviews',
id: 'code-reviews',
title: 'Code Reviews',
- quadrant: 'process',
+ quadrant: 'process'
});
entries.push({
timeline: [
@@ -162,10 +162,11 @@ entries.push({
{
ringId: 'use',
date: new Date('2020-08-06'),
- description: 'test description'
+ description: 'description'
},
],
- url: '#',
+ url: 'https://github.com',
+ urlTarget: '_blank',
key: 'github-actions',
id: 'github-actions',
title: 'GitHub Actions',
diff --git a/plugins/tech-radar/src/utils/components.tsx b/plugins/tech-radar/src/utils/components.tsx
index 24623738f4..ae2ecb760d 100644
--- a/plugins/tech-radar/src/utils/components.tsx
+++ b/plugins/tech-radar/src/utils/components.tsx
@@ -29,7 +29,7 @@ export const WithLink = ({
className,
children,
}: WithLinkProps): JSX.Element =>
- url ? (
+ (url && url!== '#') ? (
{children}