From b1df3c0271e43973b8989cf69c4dcb8d773633e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20L=C3=B3pez=20Dato?= Date: Tue, 12 Nov 2024 11:41:53 -0300 Subject: [PATCH] chore: Only show stale flag warning when feature_versioning enabled (#4825) --- frontend/web/components/StaleFlagWarning.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/web/components/StaleFlagWarning.tsx b/frontend/web/components/StaleFlagWarning.tsx index 641782d25e01..8e4780948036 100644 --- a/frontend/web/components/StaleFlagWarning.tsx +++ b/frontend/web/components/StaleFlagWarning.tsx @@ -8,12 +8,14 @@ import { IonIcon } from '@ionic/react' import { close, warning } from 'ionicons/icons' import Tooltip from './Tooltip' import ProjectStore from 'common/stores/project-store' +import flagsmith from 'flagsmith/isomorphic' type StaleFlagWarningType = { projectFlag: ProjectFlag } const StaleFlagWarning: FC = ({ projectFlag }) => { + if (!flagsmith.hasFeature('feature_versioning')) return null const protectedTags = getProtectedTags(projectFlag, `${projectFlag.project}`) if (protectedTags?.length) { return null