@@ -80,12 +80,6 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
80
80
}
81
81
82
82
const toggleUpdateDependencyModal = ( ) => {
83
- ReactGA . event ( {
84
- category : 'Application Dependency' ,
85
- action : 'Edit Dependency' ,
86
- label : 'Edit Dependency' ,
87
- } )
88
-
89
83
if ( isUpdateDependencyModalOpen ) {
90
84
searchParams . delete ( MODAL_STATE . key )
91
85
} else {
@@ -94,6 +88,15 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
94
88
history . replace ( { search : searchParams . toString ( ) } )
95
89
}
96
90
91
+ const handleEditDependencyClick = ( ) => {
92
+ ReactGA . event ( {
93
+ category : 'Application Dependency' ,
94
+ action : 'Edit Dependency click' ,
95
+ label : 'Edit Dependency click' ,
96
+ } )
97
+ toggleUpdateDependencyModal ( )
98
+ }
99
+
97
100
useEffect ( ( ) => {
98
101
// add a default tab if not set
99
102
if ( ! activeTab || ! Object . values ( OVERVIEW_TABS ) . includes ( activeTab ) ) {
@@ -515,7 +518,7 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
515
518
< button
516
519
type = "button"
517
520
className = { `cta flex h-28 dc__gap-4 ${ isEditDependencyButtonDisabled ? 'disabled-opacity' : '' } ` }
518
- onClick = { isEditDependencyButtonDisabled ? noop : toggleUpdateDependencyModal }
521
+ onClick = { isEditDependencyButtonDisabled ? noop : handleEditDependencyClick }
519
522
>
520
523
< EditIcon className = "mw-14 icon-dim-14 scn-0 dc__no-svg-fill" />
521
524
Edit Dependency
0 commit comments