@@ -3,7 +3,7 @@ import { EuiText } from '@elastic/eui';
3
3
import { Formik } from 'formik' ;
4
4
import { observer } from 'mobx-react-lite' ;
5
5
import React , { useCallback , useEffect , useRef , useState } from 'react' ;
6
- import { useIsMobile } from 'hooks' ;
6
+ import { useFeatureFlag , useIsMobile } from 'hooks' ;
7
7
import { RefineDescriptionModal } from 'components/common/RefineDescriptionModal' ;
8
8
import { snippetStore } from 'store/snippetStore' ;
9
9
import { toCapitalize } from '../../../helpers/helpers' ;
@@ -41,7 +41,7 @@ function Form(props: FormProps) {
41
41
} = props ;
42
42
const page = 1 ;
43
43
const isMobile = useIsMobile ( ) ;
44
-
44
+ const { isEnabled } = useFeatureFlag ( 'staking' ) ;
45
45
const [ loading , setLoading ] = useState ( true ) ;
46
46
const [ dynamicInitialValues , setDynamicInitialValues ] : any = useState ( null ) ;
47
47
const [ dynamicSchema , setDynamicSchema ] : any = useState ( null ) ;
@@ -374,6 +374,11 @@ function Form(props: FormProps) {
374
374
< Input
375
375
{ ...item }
376
376
key = { item . name }
377
+ type = {
378
+ ( item . name === 'isStakable' || item . name === 'stakeMin' ) && ! isEnabled
379
+ ? 'hidden'
380
+ : item . type
381
+ }
377
382
newDesign = { item . name === 'description' ? false : true }
378
383
values = { values }
379
384
testId = { item . name }
@@ -605,7 +610,12 @@ function Form(props: FormProps) {
605
610
>
606
611
< Input
607
612
{ ...item }
608
- type = { item . type }
613
+ type = {
614
+ ( item . name === 'isStakable' || item . name === 'stakeMin' ) &&
615
+ ! isEnabled
616
+ ? 'hidden'
617
+ : item . type
618
+ }
609
619
newDesign = { item . name === 'description' ? false : true }
610
620
values = { values }
611
621
setAssigneefunction = { item . name === 'assignee' && setAssigneeName }
0 commit comments