import React from 'react' ; import { useServices } from '../app_context' ; interface Props { data : any ; children : React . ReactNode ; } export const DataPlaceholder = ( { data , children } ) => { const { i18n } = useServices ( ) ; if ( data != null ) { return children as any ; } return ( < > { i18n . translate ( 'xpack.snapshotRestore.dataPlaceholderLabel' , { defaultMessage : '-' , } ) } < />); } ;