Rely on the default Link behavior for opening external links in a new window in the SupportButton

Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
This commit is contained in:
Dominik Henneke
2021-09-23 14:02:39 +02:00
parent 07bd9068b4
commit 9c3cb8d4e2
2 changed files with 6 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Stop forcing `target="_blank"` in the `SupportButton` but instead use the default logic of the `Link` component, that opens external targets in a new window and relative targets in the same window.
@@ -54,9 +54,7 @@ const SupportIcon = ({ icon }: { icon: string | undefined }) => {
};
const SupportLink = ({ link }: { link: SupportItemLink }) => (
<Link to={link.url} target="_blank" rel="noreferrer noopener">
{link.title ?? link.url}
</Link>
<Link to={link.url}>{link.title ?? link.url}</Link>
);
const SupportListItem = ({ item }: { item: SupportItem }) => {