diff --git a/.changeset/itchy-mirrors-juggle.md b/.changeset/itchy-mirrors-juggle.md new file mode 100644 index 0000000000..6fd7c7543a --- /dev/null +++ b/.changeset/itchy-mirrors-juggle.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-notifications': patch +'@backstage/plugin-scaffolder': patch +--- + +Remove React import form notification and scaffolder plugin diff --git a/plugins/notifications/src/components/UserNotificationSettingsCard/OriginRow.tsx b/plugins/notifications/src/components/UserNotificationSettingsCard/OriginRow.tsx index d8d347c202..f4f6c61493 100644 --- a/plugins/notifications/src/components/UserNotificationSettingsCard/OriginRow.tsx +++ b/plugins/notifications/src/components/UserNotificationSettingsCard/OriginRow.tsx @@ -14,7 +14,6 @@ * limitations under the License. */ -import React from 'react'; import { ChannelSetting, isNotificationsEnabledFor, diff --git a/plugins/notifications/src/components/UserNotificationSettingsCard/TopicRow.tsx b/plugins/notifications/src/components/UserNotificationSettingsCard/TopicRow.tsx index 5c9c3cbacc..ed2ca8fd05 100644 --- a/plugins/notifications/src/components/UserNotificationSettingsCard/TopicRow.tsx +++ b/plugins/notifications/src/components/UserNotificationSettingsCard/TopicRow.tsx @@ -14,7 +14,6 @@ * limitations under the License. */ -import React from 'react'; import { isNotificationsEnabledFor, NotificationSettings, diff --git a/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateFilters.tsx b/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateFilters.tsx index e0c80c27cf..05f3043dd1 100644 --- a/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateFilters.tsx +++ b/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateFilters.tsx @@ -26,7 +26,7 @@ import { ClassNameMap } from '@material-ui/core/styles/withStyles'; import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import classNames from 'classnames'; -import React, { ReactElement, useState } from 'react'; +import { cloneElement, Fragment, ReactElement, useState } from 'react'; import { scaffolderTranslationRef } from '../../translation'; import { Expanded, RenderSchema, SchemaRenderContext } from '../RenderSchema'; import { ScaffolderUsageExamplesTable } from '../ScaffolderUsageExamplesTable'; @@ -60,7 +60,7 @@ const FilterDetailContent = ({ headings: [], }; return ( - + {filter.description && } @@ -84,7 +84,7 @@ const FilterDetailContent = ({ const [argSchema, required] = inspectFunctionArgSchema(arg); return ( - +
@@ -101,7 +101,7 @@ const FilterDetailContent = ({ }} schema={argSchema} /> - + ); })} @@ -133,7 +133,7 @@ const FilterDetailContent = ({ )} - + ); }; @@ -178,7 +178,7 @@ export const TemplateFilters = ({ > {name} - {React.cloneElement(baseLink, { + {cloneElement(baseLink, { to: `${baseLink.props.to}#${fragment}`, })} diff --git a/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateGlobals.tsx b/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateGlobals.tsx index 329f7b9742..3ee367e009 100644 --- a/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateGlobals.tsx +++ b/plugins/scaffolder/src/components/TemplatingExtensionsPage/TemplateGlobals.tsx @@ -26,7 +26,7 @@ import { ClassNameMap } from '@material-ui/core/styles/withStyles'; import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import classNames from 'classnames'; -import React, { ReactElement, useState } from 'react'; +import { cloneElement, Fragment, ReactElement, useState } from 'react'; import { scaffolderTranslationRef } from '../../translation'; import { Expanded, RenderSchema, SchemaRenderContext } from '../RenderSchema'; import { ScaffolderUsageExamplesTable } from '../ScaffolderUsageExamplesTable'; @@ -60,7 +60,7 @@ const FunctionDetailContent = ({ headings: [], }; return ( - + {fn.description && } {schema?.arguments?.length && ( @@ -71,7 +71,7 @@ const FunctionDetailContent = ({ const [argSchema, required] = inspectFunctionArgSchema(arg); return ( - +
@@ -89,7 +89,7 @@ const FunctionDetailContent = ({ }} schema={argSchema} /> - + ); })} @@ -121,7 +121,7 @@ const FunctionDetailContent = ({ )} - + ); }; @@ -166,7 +166,7 @@ export const TemplateGlobalFunctions = ({ > {name} - {React.cloneElement(baseLink, { + {cloneElement(baseLink, { to: `${baseLink.props.to}#${fragment}`, })} @@ -218,7 +218,7 @@ export const TemplateGlobalValues = ({ > {name} - {React.cloneElement(baseLink, { + {cloneElement(baseLink, { to: `${baseLink.props.to}#${fragment}`, })} {gv.description && }