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