mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: avoid stale feature strategy enabled status message (#2018)
This commit is contained in:
		
							parent
							
								
									7e77270ba5
								
							
						
					
					
						commit
						6af8f7356f
					
				| @ -4,17 +4,21 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit | ||||
| import { Alert } from '@mui/material'; | ||||
| import { IFeatureToggle } from 'interfaces/featureToggle'; | ||||
| import { formatFeaturePath } from '../FeatureStrategyEdit/FeatureStrategyEdit'; | ||||
| import { useFeature } from 'hooks/api/getters/useFeature/useFeature'; | ||||
| 
 | ||||
| interface IFeatureStrategyEnabledProps { | ||||
|     feature: IFeatureToggle; | ||||
|     projectId: string; | ||||
|     featureId: string; | ||||
|     environmentId: string; | ||||
| } | ||||
| 
 | ||||
| export const FeatureStrategyEnabled = ({ | ||||
|     feature, | ||||
|     projectId, | ||||
|     featureId, | ||||
|     environmentId, | ||||
| }: IFeatureStrategyEnabledProps) => { | ||||
|     const featurePagePath = formatFeaturePath(feature.project, feature.name); | ||||
|     const featurePagePath = formatFeaturePath(projectId, featureId); | ||||
|     const { feature } = useFeature(projectId, featureId); | ||||
| 
 | ||||
|     const featurePageLink = ( | ||||
|         <Link to={featurePagePath} style={{ color: 'inherit' }}> | ||||
|  | ||||
| @ -126,7 +126,8 @@ export const FeatureStrategyForm = ({ | ||||
|         <form className={styles.form} onSubmit={onSubmitWithValidation}> | ||||
|             <div> | ||||
|                 <FeatureStrategyEnabled | ||||
|                     feature={feature} | ||||
|                     projectId={feature.project} | ||||
|                     featureId={feature.name} | ||||
|                     environmentId={environmentId} | ||||
|                 /> | ||||
|             </div> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user