From 4ec1ca165cdab8d8cdcd57743c6893a6f86b9f5c Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 27 May 2025 14:40:21 +0200 Subject: [PATCH] move flag to activate thing --- frontend/src/component/insights/InsightsCharts.tsx | 13 ++++++++++++- .../src/component/insights/LegacyInsightsCharts.tsx | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/src/component/insights/InsightsCharts.tsx b/frontend/src/component/insights/InsightsCharts.tsx index e7c478443d..c80a4d1662 100644 --- a/frontend/src/component/insights/InsightsCharts.tsx +++ b/frontend/src/component/insights/InsightsCharts.tsx @@ -19,6 +19,7 @@ import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { WidgetTitle } from './components/WidgetTitle/WidgetTitle.tsx'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { useUiFlag } from 'hooks/useUiFlag.ts'; +import { LegacyInsightsCharts } from './LegacyInsightsCharts.tsx'; export interface IChartsProps { flagTrends: InstanceInsightsSchema['flagTrends']; @@ -101,7 +102,17 @@ const Section: FC> = ({ ); -export const InsightsCharts: FC = ({ +export const InsightsCharts: FC = (props) => { + const useNewInsightsCharts = useUiFlag('lifecycleMetrics'); + + return useNewInsightsCharts ? ( + + ) : ( + + ); +}; + +const NewInsightsCharts: FC = ({ projects, summary, userTrends, diff --git a/frontend/src/component/insights/LegacyInsightsCharts.tsx b/frontend/src/component/insights/LegacyInsightsCharts.tsx index 1c53bb5bab..512b4fdd73 100644 --- a/frontend/src/component/insights/LegacyInsightsCharts.tsx +++ b/frontend/src/component/insights/LegacyInsightsCharts.tsx @@ -90,7 +90,7 @@ const StyledChartContainer = styled(Box)(({ theme }) => ({ padding: theme.spacing(3), })); -export const InsightsCharts: FC = ({ +export const LegacyInsightsCharts: FC = ({ projects, summary, userTrends,