[MM-55095] Replace usage of LocalizedIcon in 'backstage_header.tsx' with i/span tags (#25117)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5a1c658183
Коммит
e5adf25fa0
@@ -12,14 +12,9 @@ exports[`components/backstage/components/BackstageHeader should match snapshot w
|
|||||||
className="backstage-header__divider"
|
className="backstage-header__divider"
|
||||||
key="divider1"
|
key="divider1"
|
||||||
>
|
>
|
||||||
<LocalizedIcon
|
<i
|
||||||
className="fa fa-angle-right"
|
className="fa fa-angle-right"
|
||||||
title={
|
title="Breadcrumb Icon"
|
||||||
Object {
|
|
||||||
"defaultMessage": "Breadcrumb Icon",
|
|
||||||
"id": "generic_icons.breadcrumb",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -3,16 +3,14 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import type {ReactNode} from 'react';
|
import type {ReactNode} from 'react';
|
||||||
|
import {useIntl} from 'react-intl';
|
||||||
import LocalizedIcon from 'components/localized_icon';
|
|
||||||
|
|
||||||
import {t} from 'utils/i18n';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BackstageHeader = ({children}: Props) => {
|
const BackstageHeader = ({children}: Props) => {
|
||||||
|
const {formatMessage} = useIntl();
|
||||||
const childrenElements: ReactNode[] = [];
|
const childrenElements: ReactNode[] = [];
|
||||||
|
|
||||||
React.Children.forEach(children, (child, index) => {
|
React.Children.forEach(children, (child, index) => {
|
||||||
@@ -22,9 +20,9 @@ const BackstageHeader = ({children}: Props) => {
|
|||||||
key={'divider' + index}
|
key={'divider' + index}
|
||||||
className='backstage-header__divider'
|
className='backstage-header__divider'
|
||||||
>
|
>
|
||||||
<LocalizedIcon
|
<i
|
||||||
className='fa fa-angle-right'
|
className='fa fa-angle-right'
|
||||||
title={{id: t('generic_icons.breadcrumb'), defaultMessage: 'Breadcrumb Icon'}}
|
title={formatMessage({id: 'generic_icons.breadcrumb', defaultMessage: 'Breadcrumb Icon'})}
|
||||||
/>
|
/>
|
||||||
</span>,
|
</span>,
|
||||||
);
|
);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user