Navigation: hide sectionNav when the dockedMegaMenu feature toggle is enabled (#75026)

This commit is contained in:
Laura Fernández 2023-09-19 12:34:53 +02:00 committed by GitHub
parent 0557a38da1
commit 0c08163357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ import React, { PropsWithChildren } from 'react';
import { GrafanaTheme2, PageLayoutType } from '@grafana/data'; import { GrafanaTheme2, PageLayoutType } from '@grafana/data';
import { useStyles2, LinkButton } from '@grafana/ui'; import { useStyles2, LinkButton } from '@grafana/ui';
import config from 'app/core/config';
import { useGrafana } from 'app/core/context/GrafanaContext'; import { useGrafana } from 'app/core/context/GrafanaContext';
import { CommandPalette } from 'app/features/commandPalette/CommandPalette'; import { CommandPalette } from 'app/features/commandPalette/CommandPalette';
import { KioskMode } from 'app/types'; import { KioskMode } from 'app/types';
@ -61,7 +62,9 @@ export function AppChrome({ children }: Props) {
)} )}
<main className={contentClass} id="pageContent"> <main className={contentClass} id="pageContent">
<div className={styles.panes}> <div className={styles.panes}>
{state.layout === PageLayoutType.Standard && state.sectionNav && <SectionNav model={state.sectionNav} />} {state.layout === PageLayoutType.Standard && state.sectionNav && !config.featureToggles.dockedMegaMenu && (
<SectionNav model={state.sectionNav} />
)}
<div className={styles.pageContainer}>{children}</div> <div className={styles.pageContainer}>{children}</div>
</div> </div>
</main> </main>