Improve rendering of multiple support item links in the SupportButton

Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
This commit is contained in:
Dominik Henneke
2021-03-01 17:10:42 +01:00
parent 6491494cb2
commit bece090572
2 changed files with 11 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core': patch
---
Improve rendering of multiple support item links in the `SupportButton`
@@ -66,12 +66,12 @@ const SupportListItem = ({ item }: { item: SupportItem }) => {
<ListItemText
primary={item.title}
secondary={
<>
{item.links &&
item.links.map(link => (
<SupportLink link={link} key={link.url} />
))}
</>
item.links &&
item.links
.map<React.ReactNode>(link => (
<SupportLink link={link} key={link.url} />
))
.reduce((prev, curr, idx) => [prev, <br key={idx} />, curr])
}
/>
</ListItem>