From d4c51957f0d9ad9d0012c316b16c141cc798abb4 Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Wed, 24 Jul 2024 23:31:51 +0800 Subject: [PATCH] feat: test Signed-off-by: SuZhou-Joe --- src/core/public/chrome/ui/header/header.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/public/chrome/ui/header/header.tsx b/src/core/public/chrome/ui/header/header.tsx index 55338cb73d92..ad074240a61b 100644 --- a/src/core/public/chrome/ui/header/header.tsx +++ b/src/core/public/chrome/ui/header/header.tsx @@ -133,13 +133,14 @@ export function Header({ const appId = useObservable(application.currentAppId$, ''); const [isNavOpen, setIsNavOpen] = useState(false); const sidecarConfig = useObservable(observables.sidecarConfig$, undefined); + const toggleCollapsibleNavRef = createRef void }>(); /** * This is a workaround on 2.16 to hide the navigation items within left navigation * when user is in homepage with workspace enabled + new navigation enabled */ const shouldHideExpandIcon = - navGroupEnabled && appId === 'home' && application.capabilities.workspaces.enabled; + navGroupEnabled && appId === 'home' && application.capabilities?.workspaces?.enabled; const sidecarPaddingStyle = useMemo(() => { return getOsdSidecarPaddingStyle(sidecarConfig); @@ -149,15 +150,12 @@ export function Header({ return ; } - const toggleCollapsibleNavRef = createRef void }>(); const navId = htmlIdGenerator()(); const className = classnames('hide-for-sharing', 'headerGlobalNav'); const { useExpandedHeader = true } = branding; const expandedHeaderColorScheme: EuiHeaderProps['theme'] = 'dark'; - // a comment - return ( <>