diff --git a/ui/app/src/Header/Header.tsx b/ui/app/src/Header/Header.tsx index 6f4f324be..7933167ea 100644 --- a/ui/app/src/Header/Header.tsx +++ b/ui/app/src/Header/Header.tsx @@ -9,7 +9,11 @@ import { SidebarContext, Header as AppHeader, } from '@component-controls/components'; -import { useConfig, useDocTypeCount } from '@component-controls/store'; +import { + useConfig, + useDocTypeCount, + useCurrentDocument, +} from '@component-controls/store'; import { Search } from '@component-controls/blocks'; export interface HeaderProps { @@ -25,6 +29,7 @@ export const Header: FC = ({ toolbar = {} }) => { const { SidebarToggle, collapsed, responsive } = useContext(SidebarContext); const docCounts = useDocTypeCount(); const config = useConfig(); + const doc = useCurrentDocument(); const { pages } = config || {}; const leftActions: ActionItems = useMemo(() => { const actions: ActionItems = [ @@ -62,7 +67,7 @@ export const Header: FC = ({ toolbar = {} }) => { return ( - {collapsed && } + {doc?.navSidebar && collapsed && }