diff --git a/x-pack/plugins/infra/public/components/header/header.tsx b/x-pack/plugins/infra/public/components/header/header.tsx index 469916cd27e82..560c332c31b12 100644 --- a/x-pack/plugins/infra/public/components/header/header.tsx +++ b/x-pack/plugins/infra/public/components/header/header.tsx @@ -6,7 +6,6 @@ import React from 'react'; -import { InjectedIntl, injectI18n } from '@kbn/i18n/react'; import { Breadcrumb } from 'ui/chrome/api/breadcrumbs'; import { WithKibanaChrome } from '../../containers/with_kibana_chrome'; import { ExternalHeader } from './external_header'; @@ -15,30 +14,18 @@ import { LegacyHeader } from './legacy_header'; interface HeaderProps { breadcrumbs?: Breadcrumb[]; appendSections?: React.ReactNode; - intl: InjectedIntl; } -export const Header = injectI18n(({ appendSections, breadcrumbs = [], intl }: HeaderProps) => { - const prefixedBreadcrumbs = [ - { - href: '#/', - text: intl.formatMessage({ - id: 'xpack.infra.header.infrastructureTitle', - defaultMessage: 'Infrastructure', - }), - }, - ...(breadcrumbs || []), - ]; - +export const Header = ({ appendSections, breadcrumbs = [] }: HeaderProps) => { return ( {({ setBreadcrumbs, uiSettings: { k7Design } }) => k7Design ? ( - + ) : ( - + ) } ); -}); +}; diff --git a/x-pack/plugins/infra/public/pages/home/index.tsx b/x-pack/plugins/infra/public/pages/home/index.tsx index 808c4e06e5639..0f0668e9b9aab 100644 --- a/x-pack/plugins/infra/public/pages/home/index.tsx +++ b/x-pack/plugins/infra/public/pages/home/index.tsx @@ -41,6 +41,15 @@ export const HomePage = injectI18n( appendSections={ } + breadcrumbs={[ + { + href: '#/', + text: intl.formatMessage({ + id: 'xpack.infra.header.infrastructureTitle', + defaultMessage: 'Infrastructure', + }), + }, + ]} /> diff --git a/x-pack/plugins/infra/public/pages/metrics/index.tsx b/x-pack/plugins/infra/public/pages/metrics/index.tsx index 47430af615464..21b4f9f553009 100644 --- a/x-pack/plugins/infra/public/pages/metrics/index.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/index.tsx @@ -101,7 +101,16 @@ export const MetricDetail = withTheme( nodeId={nodeId} > {({ name, filteredLayouts, loading: metadataLoading }) => { - const breadcrumbs = [{ text: name }]; + const breadcrumbs = [ + { + href: '#/', + text: intl.formatMessage({ + id: 'xpack.infra.header.infrastructureTitle', + defaultMessage: 'Infrastructure', + }), + }, + { text: name }, + ]; return (