Skip to content

Commit

Permalink
fix: flagsmith stale flags check (#4831)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg authored Nov 12, 2024
1 parent b1df3c0 commit ea6a169
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/web/components/StaleFlagWarning.tsx
Original file line number Diff line number Diff line change
@@ -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<StaleFlagWarningType> = ({ 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
Expand Down

0 comments on commit ea6a169

Please sign in to comment.