diff --git a/frontend/src/scenes/data-management/DataManagementScene.stories.tsx b/frontend/src/scenes/data-management/DataManagementScene.stories.tsx index e1c6f67232a9e..ec7258de9ecff 100644 --- a/frontend/src/scenes/data-management/DataManagementScene.stories.tsx +++ b/frontend/src/scenes/data-management/DataManagementScene.stories.tsx @@ -1,4 +1,4 @@ -import { mswDecorator } from '~/mocks/browser' +import { mswDecorator, useFeatureFlags } from '~/mocks/browser' import { Meta } from '@storybook/react' import { useAvailableFeatures } from '~/mocks/features' import { AvailableFeature } from '~/types' @@ -9,6 +9,7 @@ import { App } from 'scenes/App' import { DatabaseSchemaQueryResponse } from '~/queries/schema' import { ingestionWarningsResponse } from './ingestion-warnings/__mocks__/ingestion-warnings-response' import { dayjs } from 'lib/dayjs' +import { FEATURE_FLAGS } from 'lib/constants' const MOCK_DATABASE: DatabaseSchemaQueryResponse = { events: [ @@ -116,6 +117,7 @@ export function Database(): JSX.Element { } export function IngestionWarnings(): JSX.Element { + useFeatureFlags([FEATURE_FLAGS.INGESTION_WARNINGS_ENABLED]) useEffect(() => { router.actions.push(urls.ingestionWarnings()) }, []) diff --git a/frontend/src/scenes/data-management/DataManagementScene.tsx b/frontend/src/scenes/data-management/DataManagementScene.tsx index c72be8afa6897..af07c355ee8d7 100644 --- a/frontend/src/scenes/data-management/DataManagementScene.tsx +++ b/frontend/src/scenes/data-management/DataManagementScene.tsx @@ -156,10 +156,7 @@ const dataManagementSceneLogic = kea({ const allTabs = Object.keys(tabs) return allTabs.filter((x) => { - if (x === DataManagementTab.IngestionWarnings) { - return showWarningsTab - } - return true + return x === DataManagementTab.IngestionWarnings ? showWarningsTab : true }) as DataManagementTab[] }, ],