Merge pull request #7297 from SDA-SE/feat/link-support-button

Rely on the default `Link` behavior for opening external links in a new window in the `SupportButton`
This commit is contained in:
Patrik Oldsberg
2021-09-23 14:53:44 +02:00
committed by GitHub
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 }) => {