From 90102e989d4831b5cd35028f6efc8539da4f773d Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Fri, 26 Apr 2024 14:37:10 -0700 Subject: [PATCH] Test fix for mounting of OutPortal --- .../public/app/home/global_header/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx b/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx index ebca91cf88237..f82207fcb925e 100644 --- a/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx @@ -38,7 +38,7 @@ const BUTTON_ADD_DATA = i18n.translate('xpack.securitySolution.globalHeader.butt */ export const GlobalHeader = React.memo(() => { const portalNode = useMemo(() => createHtmlPortalNode(), []); - const { setHeaderActionMenu, ...startServices } = useKibana().services; + const { theme, setHeaderActionMenu, i18n: kibanaServiceI18n } = useKibana().services; const { pathname } = useLocation(); const getTimeline = useMemo(() => timelineSelectors.getTimelineByIdSelector(), []); @@ -55,7 +55,10 @@ export const GlobalHeader = React.memo(() => { useEffect(() => { if (setHeaderActionMenu) { setHeaderActionMenu((element) => { - const mount = toMountPoint(, startServices); + const mount = toMountPoint(, { + theme, + i18n: kibanaServiceI18n, + }); return mount(element); }); @@ -68,7 +71,7 @@ export const GlobalHeader = React.memo(() => { setHeaderActionMenu(undefined); }; } - }, [portalNode, setHeaderActionMenu, dashboardViewPath, startServices]); + }, [portalNode, setHeaderActionMenu, theme, kibanaServiceI18n, dashboardViewPath]); return (