balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

index.js (557B)


      1 import { checkIfUserNeedsToActivatePlugins } from '../helpers'
      2 import ActivatePluginsModal from './ActivatePluginsModal'
      3 import { render } from '@wordpress/element'
      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(<ActivatePluginsModal showClose={true}/>, document.getElementById('extendify-root'))
     13             })
     14         },
     15     }
     16 }