| 1 |
import { render } from '@wordpress/element' |
| 2 |
import { checkIfUserNeedsToActivatePlugins } from '../helpers' |
| 3 |
import ActivatePluginsModal from './ActivatePluginsModal' |
| 4 |
|
| 5 |
export const hasPluginsActivated = async (template) => { |
| 6 |
return { |
| 7 |
id: 'hasPluginsActivated', |
| 8 |
pass: !(await checkIfUserNeedsToActivatePlugins(template)), |
| 9 |
allow() {}, |
| 10 |
deny() { |
| 11 |
return new Promise(() => { |
| 12 |
render( |
| 13 |
<ActivatePluginsModal showClose={true} />, |
| 14 |
document.getElementById('extendify-root'), |
| 15 |
) |
| 16 |
}) |
| 17 |
}, |
| 18 |
} |
| 19 |
} |
| 20 |
|