fix: prevent 3 React elements from being created for each part of the support title (#26562)

Signed-off-by: Carl-Erik Bergström <cbergstrom@spotify.com>
This commit is contained in:
Carl-Erik Bergström
2024-09-09 14:53:11 +02:00
committed by GitHub
parent efe4d9b0e0
commit f3c90da8c7
2 changed files with 8 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
Support button title should be contained in a single menu item
@@ -40,6 +40,8 @@ export const DefaultImportPage = () => {
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
const appTitle = configApi.getOptionalString('app.title') || 'Backstage';
const supportTitle = `Start tracking your component in ${appTitle} by adding it to the software catalog.`;
const contentItems = [
<Grid key={0} item xs={12} md={4} lg={6} xl={8}>
<ImportInfoCard />
@@ -55,10 +57,7 @@ export const DefaultImportPage = () => {
<Header title="Register an existing component" />
<Content>
<ContentHeader title={`Start tracking your component in ${appTitle}`}>
<SupportButton>
Start tracking your component in {appTitle} by adding it to the
software catalog.
</SupportButton>
<SupportButton>{supportTitle}</SupportButton>
</ContentHeader>
<Grid container spacing={2}>