@@ -13,7 +13,6 @@ import type {
1313} from 'component/changeRequest/changeRequest.types' ;
1414import { useCurrentStrategy } from './hooks/useCurrentStrategy.ts' ;
1515import { Badge } from 'component/common/Badge/Badge' ;
16- import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender' ;
1716import { flexRow } from 'themes/themeStyles' ;
1817import { EnvironmentVariantsTable } from 'component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsCard/EnvironmentVariantsTable/EnvironmentVariantsTable' ;
1918import { ChangeOverwriteWarning } from './ChangeOverwriteWarning/ChangeOverwriteWarning.tsx' ;
@@ -173,42 +172,31 @@ const UpdateStrategy: FC<{
173172 />
174173 < ChangeItemWrapper >
175174 < ChangeItemInfo >
176- { change . action === 'updateMilestoneStrategy' ? (
177- < Action > Editing strategy</ Action >
178- ) : (
179- < EditHeader
180- wasDisabled = { currentStrategy ?. disabled }
181- willBeDisabled = { change . payload ?. disabled }
182- />
183- ) }
175+ < EditHeader
176+ wasDisabled = { currentStrategy ?. disabled }
177+ willBeDisabled = { change . payload ?. disabled }
178+ />
184179 < NameWithChangeInfo
185180 newName = { change . payload . title }
186181 previousName = { previousTitle }
187182 />
188183 </ ChangeItemInfo >
189184 { actions }
190185 </ ChangeItemWrapper >
191- { change . action === 'updateStrategy' && (
192- < ConditionallyRender
193- condition = {
194- change . payload ?. disabled !== currentStrategy ?. disabled
195- }
196- show = {
197- < Typography
198- sx = { {
199- marginTop : ( theme ) => theme . spacing ( 2 ) ,
200- marginBottom : ( theme ) => theme . spacing ( 2 ) ,
201- ...flexRow ,
202- gap : ( theme ) => theme . spacing ( 1 ) ,
203- } }
204- >
205- This strategy will be{ ' ' }
206- < DisabledEnabledState
207- disabled = { change . payload ?. disabled || false }
208- />
209- </ Typography >
210- }
211- />
186+ { change . payload ?. disabled !== currentStrategy ?. disabled && (
187+ < Typography
188+ sx = { {
189+ marginTop : ( theme ) => theme . spacing ( 2 ) ,
190+ marginBottom : ( theme ) => theme . spacing ( 2 ) ,
191+ ...flexRow ,
192+ gap : ( theme ) => theme . spacing ( 1 ) ,
193+ } }
194+ >
195+ This strategy will be{ ' ' }
196+ < DisabledEnabledState
197+ disabled = { change . payload ?. disabled || false }
198+ />
199+ </ Typography >
212200 ) }
213201
214202 < TabPanel >
0 commit comments