# extendify/0.9.3/src/Library/middleware/hasPluginsActivated/index.js

Extendify, version 0.9.3. 20 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.9.3/code/src/Library/middleware/hasPluginsActivated/index.js
- Raw: https://pluginprobe.com/plugins/extendify/0.9.3/raw/src/Library/middleware/hasPluginsActivated/index.js
- Modified: 2022-05-27T00:51:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/0.9.3/code/src/Library/middleware/hasPluginsActivated/index.js#L10-L20`.

```javascript
import { render } from '@wordpress/element'
import { checkIfUserNeedsToActivatePlugins } from '../helpers'
import ActivatePluginsModal from './ActivatePluginsModal'

export const hasPluginsActivated = async (template) => {
    return {
        id: 'hasPluginsActivated',
        pass: !(await checkIfUserNeedsToActivatePlugins(template)),
        allow() {},
        deny() {
            return new Promise(() => {
                render(
                    <ActivatePluginsModal showClose={true} />,
                    document.getElementById('extendify-root'),
                )
            })
        },
    }
}

```
