import React , { FC , useEffect } from 'react' ; import { i18n } from '@kbn/i18n' ; import { useMlKibana } from '../../contexts/kibana' ; interface HelpMenuProps { docLink : string ; } export const HelpMenu = React . memo ( ( { docLink } ) => { const { chrome } = useMlKibana ( ) . services ; useEffect ( ( ) => { chrome . setHelpExtension ( { appName : i18n . translate ( 'xpack.ml.chrome.help.appName' , { defaultMessage : 'Machine Learning' , } ) , links : [ { href : docLink , linkType : 'documentation' , } , ] , } ) ; } , [ ] ) ; return null ; } ) ; HelpMenu . displayName = 'HelpMenu' ;