import React , { useEffect , useState } from 'react' ; import { EuiIcon , EuiIconProps } from '@elastic/eui' ; import OsqueryLogo from './osquery.svg' ; export type OsqueryIconProps = Omit < EuiIconProps , 'type' > ; const OsqueryIconComponent = ( props ) => { const [ Icon , setIcon ] = useState < React . ReactElement | null > ( null ) ; useEffect ( ( ) => { const interval = setInterval ( ( ) => { setIcon ( < EuiIcon size = "xl" type = { OsqueryLogo } { ... props } / > ) ; } , 0 ) ; return ( ) => clearInterval ( interval ) ; } , [ props , setIcon ] ) ; return Icon ; } ; export const OsqueryIcon = React . memo ( OsqueryIconComponent ) ;