mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-01 13:47:27 +02:00
move flag to activate thing
This commit is contained in:
parent
dc01cba6e5
commit
4ec1ca165c
@ -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<PropsWithChildren<{ title: string }>> = ({
|
||||
</section>
|
||||
);
|
||||
|
||||
export const InsightsCharts: FC<IChartsProps> = ({
|
||||
export const InsightsCharts: FC<IChartsProps> = (props) => {
|
||||
const useNewInsightsCharts = useUiFlag('lifecycleMetrics');
|
||||
|
||||
return useNewInsightsCharts ? (
|
||||
<NewInsightsCharts {...props} />
|
||||
) : (
|
||||
<LegacyInsightsCharts {...props} />
|
||||
);
|
||||
};
|
||||
|
||||
const NewInsightsCharts: FC<IChartsProps> = ({
|
||||
projects,
|
||||
summary,
|
||||
userTrends,
|
||||
|
@ -90,7 +90,7 @@ const StyledChartContainer = styled(Box)(({ theme }) => ({
|
||||
padding: theme.spacing(3),
|
||||
}));
|
||||
|
||||
export const InsightsCharts: FC<IChartsProps> = ({
|
||||
export const LegacyInsightsCharts: FC<IChartsProps> = ({
|
||||
projects,
|
||||
summary,
|
||||
userTrends,
|
||||
|
Loading…
Reference in New Issue
Block a user