ErrorActivating.js (890B)
1 import { __ } from '@wordpress/i18n' 2 import { 3 Modal, Button, Notice, 4 } from '@wordpress/components' 5 import { render } from '@wordpress/element' 6 import ActivatePluginsModal from './ActivatePluginsModal' 7 8 export default function ErrorActivating({ msg }) { 9 const goBack = () => { 10 render(<ActivatePluginsModal />, document.getElementById('extendify-root')) 11 } 12 13 return <Modal 14 style={{ 15 maxWidth: '500px', 16 }} 17 title={__('Error Activating plugins', 'extendify-sdk')} 18 isDismissible={false} 19 > 20 {__('You have encountered an error that we cannot recover from. Please try again.', 'extendify-sdk')} 21 <br /> 22 <Notice isDismissible={false} status="error"> 23 {msg} 24 </Notice> 25 <Button isPrimary onClick={goBack}> 26 {__('Go back', 'extendify-sdk')} 27 </Button> 28 </Modal> 29 }