1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Use V flag for new metrics component

This commit is contained in:
Christopher Kolstad 2021-10-15 12:00:11 +02:00
parent cce0a7d465
commit 566539727d

View File

@ -12,11 +12,11 @@ const FeatureMetrics = () => {
const { projectId, featureId } = useParams<IFeatureViewParams>();
const { feature } = useFeature(projectId, featureId);
const { uiConfig } = useUiConfig();
const isEnterprise = uiConfig.flags.E;
const isNewMetricsEnabled = uiConfig.flags.V;
return (
<div className={styles.container}>
<ConditionallyRender condition={isEnterprise}
<ConditionallyRender condition={isNewMetricsEnabled}
show={<EnvironmentMetricComponent />}
elseShow={<MetricComponent featureToggle={feature} />}
/>