11import classNames from 'classnames'
22import Switch from './Switch'
3- import {
4- FeatureListProviderData ,
5- FeatureState ,
6- ProjectFlag ,
7- } from 'common/types/responses'
8- import FeatureValue from './FeatureValue'
3+ import { FeatureListProviderData , ProjectFlag } from 'common/types/responses'
4+ import FeatureValue from './feature-summary/FeatureValue'
95import SegmentOverridesIcon from './SegmentOverridesIcon'
106import IdentityOverridesIcon from './IdentityOverridesIcon'
117import Constants from 'common/constants'
12- import Utils from 'common/utils/utils'
138
149export interface CondensedFeatureRowProps {
1510 disableControls ?: boolean
1611 readOnly : boolean
1712 projectFlag : ProjectFlag
1813 environmentFlags : FeatureListProviderData [ 'environmentFlags' ]
1914 permission ?: boolean
20- editFeature : (
21- projectFlag : ProjectFlag ,
22- environmentFlag ?: FeatureState ,
23- tab ?: string ,
24- ) => void
15+ editFeature : ( tab ?: string ) => void
2516 onChange : ( ) => void
2617 style ?: React . CSSProperties
2718 className ?: string
@@ -58,8 +49,6 @@ const CondensedFeatureRow: React.FC<CondensedFeatureRowProps> = ({
5849 if ( disableControls ) return
5950 ! readOnly &&
6051 editFeature (
61- projectFlag ,
62- environmentFlags ?. [ id ] ,
6352 hasUnhealthyEvents
6453 ? Constants . featurePanelTabs . FEATURE_HEALTH
6554 : undefined ,
@@ -86,11 +75,7 @@ const CondensedFeatureRow: React.FC<CondensedFeatureRowProps> = ({
8675 < Flex className = 'table-column clickable' >
8776 < Row >
8877 < div
89- onClick = { ( ) =>
90- permission &&
91- ! readOnly &&
92- editFeature ( projectFlag , environmentFlags ?. [ id ] )
93- }
78+ onClick = { ( ) => permission && ! readOnly && editFeature ( ) }
9479 style = { { flex : 1 } }
9580 className = { `overflow-hidden ${ fadeValue ? 'faded' : '' } ` }
9681 >
@@ -103,22 +88,14 @@ const CondensedFeatureRow: React.FC<CondensedFeatureRowProps> = ({
10388 < SegmentOverridesIcon
10489 onClick = { ( e ) => {
10590 e . stopPropagation ( )
106- editFeature (
107- projectFlag ,
108- environmentFlags ?. [ id ] ,
109- Constants . featurePanelTabs . SEGMENT_OVERRIDES ,
110- )
91+ editFeature ( Constants . featurePanelTabs . SEGMENT_OVERRIDES )
11192 } }
11293 count = { projectFlag . num_segment_overrides }
11394 />
11495 < IdentityOverridesIcon
11596 onClick = { ( e ) => {
11697 e . stopPropagation ( )
117- editFeature (
118- projectFlag ,
119- environmentFlags ?. [ id ] ,
120- Constants . featurePanelTabs . IDENTITY_OVERRIDES ,
121- )
98+ editFeature ( Constants . featurePanelTabs . IDENTITY_OVERRIDES )
12299 } }
123100 count = { projectFlag . num_identity_overrides }
124101 showPlusIndicator = { showPlusIndicator }
0 commit comments