From ea6a169d9f84172850b2b01e5fd7d70b8852c9bf Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Tue, 12 Nov 2024 15:06:01 +0000 Subject: [PATCH] fix: flagsmith stale flags check (#4831) --- frontend/web/components/StaleFlagWarning.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/web/components/StaleFlagWarning.tsx b/frontend/web/components/StaleFlagWarning.tsx index 8e4780948036..2cb576f7a301 100644 --- a/frontend/web/components/StaleFlagWarning.tsx +++ b/frontend/web/components/StaleFlagWarning.tsx @@ -1,21 +1,20 @@ import { FC } from 'react' -import Tag from './tags/Tag' import Constants from 'common/constants' import moment from 'moment' import { Project, ProjectFlag } from 'common/types/responses' import { getProtectedTags } from 'common/utils/getProtectedTags' import { IonIcon } from '@ionic/react' -import { close, warning } from 'ionicons/icons' +import { warning } from 'ionicons/icons' import Tooltip from './Tooltip' import ProjectStore from 'common/stores/project-store' -import flagsmith from 'flagsmith/isomorphic' +import Utils from 'common/utils/utils' type StaleFlagWarningType = { projectFlag: ProjectFlag } const StaleFlagWarning: FC = ({ projectFlag }) => { - if (!flagsmith.hasFeature('feature_versioning')) return null + if (!Utils.getFlagsmithHasFeature('feature_versioning')) return null const protectedTags = getProtectedTags(projectFlag, `${projectFlag.project}`) if (protectedTags?.length) { return null