Skip to content

Commit

Permalink
chore: Only show stale flag warning when feature_versioning enabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rolodato authored Nov 12, 2024
1 parent 23ab3c1 commit b1df3c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/web/components/StaleFlagWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<StaleFlagWarningType> = ({ projectFlag }) => {
if (!flagsmith.hasFeature('feature_versioning')) return null
const protectedTags = getProtectedTags(projectFlag, `${projectFlag.project}`)
if (protectedTags?.length) {
return null
Expand Down

0 comments on commit b1df3c0

Please sign in to comment.