import Submit from '@cluiComponents/Submit' ; import features from '@features/features' ; import ComponentStore from '@store/componentStore' ; import React , { useEffect } from 'react' ; const { CluiStore } = ComponentStore ; const { updateChosenFeatures } = CluiStore ; type FeatureUiProps = { ui : JSX . Element | string ; featureKey : keyof typeof features ; } ; param param0 const FeatureUi = ( { ui , featureKey } ) => { useEffect ( ( ) => { updateChosenFeatures ( [ { name : featureKey } ] ) ; } , [ ] ) ; return ( < div className = "feature-wrapper" > < div className = "py-5" > { typeof ui === 'string' ? < p > { ui } < /p> : ui}</div > < div className = "pt-5" > < Submit /> < /div> < /div>); } ; export default FeatureUi ;